1
0
Fork 0
mirror of https://github.com/borgbackup/borg.git synced 2024-12-26 17:57:59 +00:00

logging with fileConfig: set json attr on "borg" logger, fixes #3114

This commit is contained in:
Thomas Waldmann 2017-10-10 02:18:13 +02:00
parent b853ad8f85
commit afba813706

View file

@ -80,6 +80,8 @@ def setup_logging(stream=None, conf_fname=None, env_var='BORG_LOGGING_CONF', lev
logging.config.fileConfig(f) logging.config.fileConfig(f)
configured = True configured = True
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
borg_logger = logging.getLogger('borg')
borg_logger.json = json
logger.debug('using logging configuration read from "{0}"'.format(conf_fname)) logger.debug('using logging configuration read from "{0}"'.format(conf_fname))
warnings.showwarning = _log_warning warnings.showwarning = _log_warning
return None return None