From 5316ed83c1e4bf4c48c5461f96d05c2490515458 Mon Sep 17 00:00:00 2001 From: youngS Date: Tue, 9 Nov 2021 14:56:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97=E4=BF=9D?= =?UTF-8?q?=E5=AD=98=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_ser/fir_ser/settings.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fir_ser/fir_ser/settings.py b/fir_ser/fir_ser/settings.py index 859cf91..755ec69 100644 --- a/fir_ser/fir_ser/settings.py +++ b/fir_ser/fir_ser/settings.py @@ -290,10 +290,11 @@ LOGGING = { }, 'TF': { 'level': 'INFO', - 'class': 'logging.handlers.TimedRotatingFileHandler', # 保存到文件,根据时间自动切 + 'class': 'logging.handlers.RotatingFileHandler', # 保存到文件,根据时间自动切 'filename': os.path.join(BASE_LOG_DIR, "flyapp_info.log"), # 日志文件 + 'maxBytes': 1024 * 1024 * 5, # 日志大小 50M 'backupCount': 10, # 备份数为3 xx.log --> xx.log.2018-08-23_00-00-00 --> xx.log.2018-08-24_00-00-00 --> ... - 'when': 'D', # 每天一切, 可选值有S/秒 M/分 H/小时 D/天 W0-W6/周(0=周一) midnight/如果没指定时间就默认在午夜 + # 'when': 'W6', # 每天一切, 可选值有S/秒 M/分 H/小时 D/天 W0-W6/周(0=周一) midnight/如果没指定时间就默认在午夜 'formatter': 'standard', 'encoding': 'utf-8', },