mirror of
https://github.com/bckelley/tconnectsync.git
synced 2026-08-24 03:34:12 -05:00
main: update logging config to show timestamps
This commit is contained in:
@@ -40,10 +40,16 @@ def main():
|
|||||||
args = parse_args()
|
args = parse_args()
|
||||||
|
|
||||||
if args.verbose:
|
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")
|
logging.root.debug("Set logging level to DEBUG")
|
||||||
else:
|
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):
|
if args.auto_update and (args.start_date or args.end_date):
|
||||||
raise Exception('Auto-update cannot be used with start/end date')
|
raise Exception('Auto-update cannot be used with start/end date')
|
||||||
|
|||||||
Reference in New Issue
Block a user