mirror of
https://github.com/httprunner/httprunner.git
synced 2026-09-05 23:51:25 +08:00
bugfix: Chinese charactor in log_file encoding error in Windows
This commit is contained in:
@@ -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()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user