Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AC558200D60 for ; Fri, 1 Dec 2017 23:21:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id AAD51160C06; Fri, 1 Dec 2017 22:21:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F0F14160BF4 for ; Fri, 1 Dec 2017 23:20:59 +0100 (CET) Received: (qmail 96611 invoked by uid 500); 1 Dec 2017 22:20:59 -0000 Mailing-List: contact commits-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cassandra.apache.org Delivered-To: mailing list commits@cassandra.apache.org Received: (qmail 96594 invoked by uid 99); 1 Dec 2017 22:20:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Dec 2017 22:20:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 955F8F6024; Fri, 1 Dec 2017 22:20:58 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: jkni@apache.org To: commits@cassandra.apache.org Message-Id: <06ec5deb00ee40b1afc31a8b3d2c3560@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: cassandra-dtest git commit: Remove current_test from log formatter and instead concatenate it to messages manually Date: Fri, 1 Dec 2017 22:20:58 +0000 (UTC) archived-at: Fri, 01 Dec 2017 22:21:00 -0000 Repository: cassandra-dtest Updated Branches: refs/heads/master 9da3a2594 -> c1bcc1866 Remove current_test from log formatter and instead concatenate it to messages manually patch by Joel Knighton; reviewed by Stefan Podkowinski for CASSANDRA-14059 Project: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/repo Commit: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/commit/c1bcc186 Tree: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/tree/c1bcc186 Diff: http://git-wip-us.apache.org/repos/asf/cassandra-dtest/diff/c1bcc186 Branch: refs/heads/master Commit: c1bcc18664cd9e9035f05a98ed23e763173fafd9 Parents: 9da3a25 Author: Joel Knighton Authored: Fri Nov 17 18:01:30 2017 -0600 Committer: Joel Knighton Committed: Fri Dec 1 16:14:43 2017 -0600 ---------------------------------------------------------------------- dtest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cassandra-dtest/blob/c1bcc186/dtest.py ---------------------------------------------------------------------- diff --git a/dtest.py b/dtest.py index 12b5dcf..cdc043d 100644 --- a/dtest.py +++ b/dtest.py @@ -96,7 +96,7 @@ CURRENT_TEST = "" logging.basicConfig(filename=os.path.join(LOG_SAVED_DIR, "dtest.log"), filemode='w', - format='%(asctime)s,%(msecs)d %(name)s %(current_test)s %(levelname)s %(message)s', + format='%(asctime)s,%(msecs)d %(name)s %(levelname)s %(message)s', datefmt='%H:%M:%S', level=logging.DEBUG) @@ -178,13 +178,13 @@ def reset_environment_vars(): def warning(msg): - LOG.warning(msg, extra={"current_test": CURRENT_TEST}) + LOG.warning(CURRENT_TEST + ' - ' + msg) if PRINT_DEBUG: print "WARN: " + msg def debug(msg): - LOG.debug(msg, extra={"current_test": CURRENT_TEST}) + LOG.debug(CURRENT_TEST + ' - ' + msg) if PRINT_DEBUG: print msg @@ -317,7 +317,7 @@ class Tester(TestCase): # making unittest think it's a test method def set_current_tst_name(self): global CURRENT_TEST - CURRENT_TEST = self.id() + self._testMethodName + CURRENT_TEST = self.id() def maybe_begin_active_log_watch(self): if ENABLE_ACTIVE_LOG_WATCHING: --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org For additional commands, e-mail: commits-help@cassandra.apache.org