This commit is contained in:
2025-10-15 17:37:40 +08:00
parent 8b1565f406
commit 2d89545816
5 changed files with 289 additions and 515 deletions
+1 -1
View File
@@ -1,7 +1,7 @@
import logging
from logging.handlers import TimedRotatingFileHandler
# 配置日志
handlers = [TimedRotatingFileHandler("log\\app.log",when="H",interval=1,backupCount=7),logging.StreamHandler()]
handlers = [TimedRotatingFileHandler("log\\app.log",when="H",interval=12,backupCount=7),logging.StreamHandler()]
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s',