From 64826b9af7ac7e53c96ec38243ffc62ed872e846 Mon Sep 17 00:00:00 2001 From: josc146 Date: Sun, 5 Nov 2023 21:00:31 +0800 Subject: [PATCH] fix log encoding error --- backend-python/utils/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend-python/utils/log.py b/backend-python/utils/log.py index 45caadc..03cd0cc 100644 --- a/backend-python/utils/log.py +++ b/backend-python/utils/log.py @@ -10,7 +10,7 @@ logger = logging.getLogger() logger.setLevel(logging.INFO) formatter = logging.Formatter("%(asctime)s - %(levelname)s\n%(message)s") fh = logging.handlers.RotatingFileHandler( - "api.log", mode="a", maxBytes=3 * 1024 * 1024, backupCount=3 + "api.log", mode="a", maxBytes=3 * 1024 * 1024, backupCount=3, encoding="utf-8" ) fh.setFormatter(formatter) logger.addHandler(fh)