Browse Source

限制日志文件大小

locky 4 years ago
parent
commit
89682c5250
1 changed files with 1 additions and 0 deletions
  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',