From bad0091f0df420813adeff93f001fc66af3b49dd Mon Sep 17 00:00:00 2001 From: yshtcn Date: Wed, 6 Sep 2023 23:49:13 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E4=BF=AE=E7=90=86=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E5=A4=84=E7=90=86UTF-8=E5=AD=97=E7=AC=A6=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ServerChanPush2TelegramBot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ServerChanPush2TelegramBot.py b/ServerChanPush2TelegramBot.py index 4fb231d..142154a 100644 --- a/ServerChanPush2TelegramBot.py +++ b/ServerChanPush2TelegramBot.py @@ -11,7 +11,7 @@ from logging.handlers import TimedRotatingFileHandler current_date = datetime.now().strftime("%Y-%m-%d") # 创建一个处理器,该处理器每天午夜都会创建一个新的日志文件 -handler = TimedRotatingFileHandler(f"received_requests_{current_date}.log", when="midnight", interval=1, backupCount=10) +handler = TimedRotatingFileHandler(f"received_requests_{current_date}.log", when="midnight", interval=1, backupCount=10, encoding='utf-8') handler.suffix = "%Y-%m-%d" # 配置日志