aboutsummaryrefslogtreecommitdiffstats
path: root/test/log.py
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2016-12-08 10:16:41 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2016-12-09 09:00:26 +0000
commite4504c6320790bba27fccf3746eb38f75f4d2e95 (patch)
treee690d99b07e4259e3be22a74662f49f80d4c5397 /test/log.py
parent56912c896ae803fad01af390ade921be68ea5ba2 (diff)
BFD: fix timing in the main loop
Properly wakeup the main process loop only when necessary to avoid missed events. Improve BFD unit test reliability and speed. Add timestamps to logs and replace Queue with more efficient deque. Change-Id: I01255a02057d3146917b43b669ccdc74f31ef0c8 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'test/log.py')
-rw-r--r--test/log.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/test/log.py b/test/log.py
index 38610b7e..5a6219ce 100644
--- a/test/log.py
+++ b/test/log.py
@@ -26,7 +26,8 @@ class ColorFormatter(logging.Formatter):
return message
handler = logging.StreamHandler(sys.stdout)
-handler.setFormatter(ColorFormatter())
+handler.setFormatter(ColorFormatter(fmt='%(asctime)s,%(msecs)03d %(message)s',
+ datefmt="%H:%M:%S"))
global_logger = logging.getLogger()
global_logger.addHandler(handler)