log: Make other logging work when logging/config_file is in use
This commit is contained in:
parent
06640f1f0c
commit
7d2906d58d
@ -34,14 +34,16 @@ def bootstrap_delayed_logging():
|
||||
def setup_logging(config, verbosity_level, save_debug_log):
|
||||
logging.captureWarnings(True)
|
||||
|
||||
if config['logging']['config_file']:
|
||||
# Logging config from file must be read before other handlers are
|
||||
# added. If not, the other handlers will have no effect.
|
||||
logging.config.fileConfig(config['logging']['config_file'])
|
||||
|
||||
setup_log_levels(config)
|
||||
setup_console_logging(config, verbosity_level)
|
||||
if save_debug_log:
|
||||
setup_debug_logging_to_file(config)
|
||||
|
||||
if config['logging']['config_file']:
|
||||
logging.config.fileConfig(config['logging']['config_file'])
|
||||
|
||||
_delayed_handler.release()
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user