Skip to content
Snippets Groups Projects

Restructure log location

Merged Ashwin Kumar Karnad requested to merge restructure-log-location into main
1 file
+ 6
1
Compare changes
  • Side-by-side
  • Inline
@@ -270,7 +270,12 @@ def set_up_logging(loglevel="warning", filename=None):
@@ -270,7 +270,12 @@ def set_up_logging(loglevel="warning", filename=None):
shell_handler.setFormatter(shell_formatter)
shell_handler.setFormatter(shell_formatter)
# use the log_level_numeric to decide how much logging is sent to shell
# use the log_level_numeric to decide how much logging is sent to shell
shell_handler.setLevel(log_level_numeric)
shell_handler.setLevel(log_level_numeric)
logger.addHandler(shell_handler)
 
# Here we set the handlers of the RootLogger to be just the one we want.
 
# The reason is that the logging module will add a <StreamHandler <stderr>
 
# (NOTSET)> handler if logging.info/logging.debug/... is used before we
 
# come across this line. And we do not want that additional handler.
 
logger.handlers = [shell_handler]
# if filename provided, write log messages to that file, too.
# if filename provided, write log messages to that file, too.
if filename:
if filename:
Loading