fixed:windows表情符号在日志系统里报错

This commit is contained in:
hrz
2025-02-08 16:17:28 +08:00
parent 4639fed6a8
commit 99f634f929
+1 -1
View File
@@ -12,7 +12,7 @@ def setup_logging(log_dir='tmp'):
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
handlers=[
logging.StreamHandler(sys.stdout),
logging.FileHandler(os.path.join(log_dir, "server.log"))
logging.FileHandler(os.path.join(log_dir, "server.log"), encoding='utf-8')
],
force=True
)