[Cryptech-Commits] [sw/libhal] 03/04: Add timestamps to debug logging.
git at cryptech.is
git at cryptech.is
Mon Mar 6 22:16:14 UTC 2017
This is an automated email from the git hooks/post-receive script.
sra at hactrn.net pushed a commit to branch pymux
in repository sw/libhal.
commit 67b94e0e2928fc55c4ff63073cd7e65e59938a42
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Mon Mar 6 17:13:21 2017 -0500
Add timestamps to debug logging.
---
unit-tests.py | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/unit-tests.py b/unit-tests.py
index e8743ed..bc7edf7 100644
--- a/unit-tests.py
+++ b/unit-tests.py
@@ -75,8 +75,13 @@ def main():
global args
args = parse_arguments(argv[1:])
argv = argv[:1] + args.only_test
- logging.basicConfig(level = logging.DEBUG if args.debug else logging.INFO)
- unittest.main(verbosity = 1 if args.quiet else 2, argv = argv, catchbreak = True, testRunner = TextTestRunner)
+ logging.basicConfig(level = logging.DEBUG if args.debug else logging.INFO,
+ datefmt = "%Y-%m-%d %H:%M:%S",
+ format = "%(asctime)-15s %(name)s[%(process)d]:%(levelname)s: %(message)s",)
+ unittest.main(verbosity = 1 if args.quiet else 2,
+ argv = argv,
+ catchbreak = True,
+ testRunner = TextTestRunner)
def parse_arguments(argv = ()):
from argparse import ArgumentParser, ArgumentDefaultsHelpFormatter
More information about the Commits
mailing list