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 <j...@apache.org>
Authored: Fri Nov 17 18:01:30 2017 -0600
Committer: Joel Knighton <j...@apache.org>
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-unsubscr...@cassandra.apache.org
For additional commands, e-mail: commits-h...@cassandra.apache.org

Reply via email to