bugfix: Chinese charactor in log_file encoding error in Windows

This commit is contained in:
debugtalk
2019-02-20 11:57:18 +08:00
parent 9c0bbbd248
commit ccef209a14
+1 -1
View File
@@ -37,7 +37,7 @@ def setup_logger(log_level, log_file=None):
) )
if log_file: if log_file:
handler = logging.FileHandler(log_file) handler = logging.FileHandler(log_file, encoding="utf-8")
else: else:
handler = logging.StreamHandler() handler = logging.StreamHandler()