From 7d813ee8fbd48f5c8fd35a807ff025dbf218f475 Mon Sep 17 00:00:00 2001 From: James Woglom Date: Fri, 9 Jul 2021 21:49:34 -0400 Subject: [PATCH] main: update logging config to show timestamps --- main.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index d513f6f..414d407 100644 --- a/main.py +++ b/main.py @@ -40,10 +40,16 @@ def main(): args = parse_args() if args.verbose: - logging.basicConfig(level=logging.DEBUG) + logging.basicConfig( + level=logging.DEBUG, + format='%(asctime)s %(levelname)-8s %(message)s', + datefmt='%Y-%m-%d %H:%M:%S') logging.root.debug("Set logging level to DEBUG") else: - logging.basicConfig(level=logging.INFO) + logging.basicConfig( + level=logging.INFO, + format='%(asctime)s %(levelname)-8s %(message)s', + datefmt='%Y-%m-%d %H:%M:%S') if args.auto_update and (args.start_date or args.end_date): raise Exception('Auto-update cannot be used with start/end date')