Fix logger default log levels

This commit is contained in:
Tim Van Baak 2020-04-23 20:03:56 -07:00
parent f7611bb79b
commit 1f24f4f9b1
1 changed files with 3 additions and 0 deletions

View File

@ -36,7 +36,10 @@ def init_logging(verbose: bool, log_filename: str):
logger = logging.getLogger("amanuensis")
if log_filename:
logger.addHandler(get_file_handler(log_filename))
logger.setLevel(logging.DEBUG)
elif verbose:
logger.addHandler(detailed_console_handler)
logger.setLevel(logging.DEBUG)
else:
logger.addHandler(basic_console_handler)
logger.setLevel(logging.INFO)