def setup_logging(disable_existing_loggers=None):
"""Setup global logging.
This uses the loaded config settings to set up the logging.
Args:
disable_existing_loggers (boolean): If we would like to disable the existing loggers when creating this one.
None means use the default from the config, True and False overwrite the config.
"""
conf = get_logging_configuration_dict()
if disable_existing_loggers is not None:
conf['disable_existing_loggers'] = True
logging_config.dictConfig(conf)
评论列表
文章目录