Explorar o código

限制日志文件大小

locky %!s(int64=4) %!d(string=hai) anos
pai
achega
89682c5250
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      AnsjerPush/formal_settings.py

+ 1 - 0
AnsjerPush/formal_settings.py

@@ -196,6 +196,7 @@ LOGGING = {
             'level': 'INFO',
             'class': 'logging.handlers.TimedRotatingFileHandler',
             'filename': BASE_DIR + '/static/log/info/info.log',
+            'maxBytes': 1024 * 1024 * 300,  # 300M
             'backupCount': 30,
             'when': 'D',
             'formatter': 'standard',