fix: log encoding to utf-8

This commit is contained in:
Zichao Lin 2024-07-24 11:57:39 +08:00
parent 8a06d7b7e8
commit e2fcedf2c9
Signed by: earthjasonlin
GPG Key ID: 406D9913DE2E42FB

@ -49,7 +49,7 @@ def setup_logging(filename):
chlr = logging.StreamHandler()
chlr.setFormatter(formatter)
chlr.setLevel('INFO')
fhlr = logging.FileHandler(filename)
fhlr = logging.FileHandler(filename, encoding='utf-8')
fhlr.setFormatter(formatter)
logger.addHandler(chlr)
logger.addHandler(fhlr)