mirror of
https://gitlab.com/ita1024/waf.git
synced 2024-11-25 19:30:04 +01:00
Do not force an encoding on config.log on python2 #1974
This commit is contained in:
parent
963c3bfd0c
commit
2fe4083f13
@ -328,7 +328,11 @@ def make_logger(path, name):
|
||||
:type name: string
|
||||
"""
|
||||
logger = logging.getLogger(name)
|
||||
hdlr = logging.FileHandler(path, 'w', encoding=sys.stdout.encoding)
|
||||
if sys.hexversion > 0x3000000:
|
||||
encoding = sys.stdout.encoding
|
||||
else:
|
||||
encoding = None
|
||||
hdlr = logging.FileHandler(path, 'w', encoding=encoding)
|
||||
formatter = logging.Formatter('%(message)s')
|
||||
hdlr.setFormatter(formatter)
|
||||
logger.addHandler(hdlr)
|
||||
|
Loading…
Reference in New Issue
Block a user