Force an encoding on config.log #1974

This commit is contained in:
Thomas Nagy 2017-06-02 21:17:09 +02:00
parent 578230789a
commit 377d09831b
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA
1 changed files with 1 additions and 1 deletions

View File

@ -328,7 +328,7 @@ def make_logger(path, name):
:type name: string
"""
logger = logging.getLogger(name)
hdlr = logging.FileHandler(path, 'w')
hdlr = logging.FileHandler(path, 'w', encoding=sys.stdout.encoding)
formatter = logging.Formatter('%(message)s')
hdlr.setFormatter(formatter)
logger.addHandler(hdlr)