Merge pull request #3134 from ThomasWaldmann/logging-config-fix-1.1

logging with fileConfig: set json attr on "borg" logger, fixes #3114
This commit is contained in:
TW 2017-10-11 14:03:22 +02:00 committed by GitHub
commit 6f8994e4b9
1 changed files with 2 additions and 0 deletions

View File

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