Return-Path: X-Original-To: apmail-aurora-reviews-archive@minotaur.apache.org Delivered-To: apmail-aurora-reviews-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4026D1083F for ; Fri, 5 Dec 2014 07:44:20 +0000 (UTC) Received: (qmail 18714 invoked by uid 500); 5 Dec 2014 07:44:20 -0000 Delivered-To: apmail-aurora-reviews-archive@aurora.apache.org Received: (qmail 18669 invoked by uid 500); 5 Dec 2014 07:44:20 -0000 Mailing-List: contact reviews-help@aurora.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: reviews@aurora.incubator.apache.org Delivered-To: mailing list reviews@aurora.incubator.apache.org Received: (qmail 18633 invoked by uid 99); 5 Dec 2014 07:44:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Dec 2014 07:44:16 +0000 X-ASF-Spam-Status: No, hits=-1994.9 required=5.0 tests=ALL_TRUSTED,HTML_MESSAGE,MANY_SPAN_IN_TEXT,T_RP_MATCHES_RCVD,WEIRD_PORT X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO mail.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 05 Dec 2014 07:44:14 +0000 Received: (qmail 17813 invoked by uid 99); 5 Dec 2014 07:43:54 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Dec 2014 07:43:54 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 855DF1C020A; Fri, 5 Dec 2014 07:43:52 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============7472341668333699211==" MIME-Version: 1.0 Subject: Re: Review Request 28742: Simplify logging in the client. From: "Zameer Manji" To: "Bill Farner" , "Maxim Khutornenko" Cc: "Aurora ReviewBot" , "Aurora" , "Zameer Manji" Date: Fri, 05 Dec 2014 07:43:52 -0000 Message-ID: <20141205074352.32525.51822@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Zameer Manji" X-ReviewGroup: Aurora X-ReviewRequest-URL: https://reviews.apache.org/r/28742/ X-Sender: "Zameer Manji" References: <20141205072650.32526.32468@reviews.apache.org> In-Reply-To: <20141205072650.32526.32468@reviews.apache.org> Reply-To: "Zameer Manji" X-ReviewRequest-Repository: aurora X-Virus-Checked: Checked by ClamAV on apache.org --===============7472341668333699211== MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/28742/ ----------------------------------------------------------- (Updated Dec. 4, 2014, 11:43 p.m.) Review request for Aurora, Maxim Khutornenko and Bill Farner. Changes ------- Remove addtional failing tests. Bugs: AURORA-919 https://issues.apache.org/jira/browse/AURORA-919 Repository: aurora Description ------- This patch makes multiple changes to simplify the logging done in the Aurora client: 1. Remove the TRANSCRIPT log level and replaced all instances with the standard Python DEBUG level. 2. Remove the custom "aurora_client" logger. This logger was designed to give each invocation of the client a unique id and record the username of the user with the intention that a hook could take this information and ship it to the cluster administer. However a hook could capture logs by adding a handler to the root log handler and generate a unique id itself. 3. Remove the 'print_log' method of the context and replaced all callers with the standard python logging facilities. 4. Removed duplicate printing/logging messages by just printing the information to the user. 5. Removed the custom PlainFormatter implementation and replaced it with Python's default formatter. 6. Replaced the "--verbose-logging" and "--logging-level" flags with a single "--verbose/-v" flag which enables DEBUG logging. Without this flag the user sees INFO and up. Diffs (updated) ----- src/main/python/apache/aurora/client/cli/BUILD ebe681a0d1735b7cc695dc3b7a14c4292d87ae32 src/main/python/apache/aurora/client/cli/__init__.py 6e553d8af459e575b2d62282a3bc0d1e266203d8 src/main/python/apache/aurora/client/cli/command_hooks.py aa850bf941bede1d3bd8aae4811cb094ba77965f src/main/python/apache/aurora/client/cli/context.py 51c7d24dca664e476e62f1864d095416dfab70e4 src/main/python/apache/aurora/client/cli/jobs.py 8f349c09637c16e2499e85f2dc96eb7ccffd0aaf src/main/python/apache/aurora/client/cli/logsetup.py 55d99c42f643910db0bf3c24022596383e160276 src/main/python/apache/aurora/client/cli/standalone_client.py b7c8de66d6e4664b536911f826e36a984e8d0fef src/main/python/apache/aurora/client/cli/task.py 91175facdc8ccccc9fd59ab66781f86ee8b5940a src/test/python/apache/aurora/client/cli/BUILD e1f9ebf96774b8f5c75de8570c6ba87d953ab649 src/test/python/apache/aurora/client/cli/test_logging.py 6285fbb07442291c2dc4096e68eb285c98994097 src/test/python/apache/aurora/client/cli/test_plugins.py 7a0a31818cbc57de952d7817f8e7c8fa1e84b25a src/test/python/apache/aurora/client/cli/test_task.py c69a624ec7063973d365846f7df3516047ceeb68 Diff: https://reviews.apache.org/r/28742/diff/ Testing ------- ./pants ./src/test/python/apache/aurora:: ```` vagrant@192:~$ aurora2 config list ./aurora/examples/jobs/hello_world.aurora jobs=[devcluster/www-data/prod/hello] vagrant@192:~$ aurora2 job create devcluster/www-data/prod/hello ./aurora/examples/jobs/hello_world.aurora INFO:root:Creating job hello INFO:root:Checking status of devcluster/www-data/prod/hello job create succeeded: job url=http://192.168.33.7:8081/scheduler/www-data/prod/hello vagrant@192:~$ aurora job list devcluster/* Must supply one of the following commands: cancel_update, create, diff, get_quota, help, inspect, kill, killall, list_jobs, open, restart, run, ssh, start_cron, status, update, version vagrant@192:~$ aurora2 job list devcluster/* INFO:root:Retrieving jobs for role None devcluster/www-data/prod/hello vagrant@192:~$ aurora2 job update devcluster/www-data/prod/hello ./aurora/examples/jobs/hello_world.aurora INFO:root:Updating job: hello INFO:root:Instances to update: [0] INFO:root:Processing in parallel with 1 worker thread(s) INFO:root:Examining instance: 0 INFO:root:Skipping unchanged instance: 0 INFO:root:Update successful Update completed successfully vagrant@192:~$ aurora2 job killall devcluster/www-data/prod/hello INFO:root:Checking status of devcluster/www-data/prod/hello INFO:root:Killing tasks for job: devcluster/www-data/prod/hello INFO:root:Instances to be killed: [0] Successfully killed shards [0] job killall succeeded ```` Thanks, Zameer Manji --===============7472341668333699211==--