def setup_logging(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.
# try:
# path = config['logging']['config_file']
# logging.config.fileConfig(path, disable_existing_loggers=False)
# except Exception as e:
# # Catch everything as logging does not specify what can go wrong.
# logger.error('Loading logging config %r failed. %s', path, e)
setup_console_logging(verbosity_level)
if save_debug_log:
print('Here we would call setup_debug_logging_to_file(config)')
# setup_debug_logging_to_file(config)
_delayed_handler.release()
评论列表
文章目录