2
0
mirror of https://gitlab.com/ita1024/waf.git synced 2024-11-29 13:30:32 +01:00

Force an encoding on config.log #1974

This commit is contained in:
Thomas Nagy 2017-06-02 21:17:09 +02:00
parent c2a1081a41
commit 7153756042
No known key found for this signature in database
GPG Key ID: 49B4C67C05277AAA

View File

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