Browse Source

transform the logging file handler into a rotative one

Olivier Massot 4 years ago
parent
commit
a64dec8395
1 changed files with 4 additions and 2 deletions
  1. 4 2
      core/logging.yml

+ 4 - 2
core/logging.yml

@@ -17,10 +17,12 @@ handlers:
         formatter: short
         
     file:
-        class: logging.FileHandler
+        class: logging.handlers.RotatingFileHandler
         level: DEBUG
         formatter: simple
         filename: debug.log
+        maxBytes: 3000
+        backupCount: 1
         encoding: utf8
 
 loggers:
@@ -32,4 +34,4 @@ loggers:
 root:
     level: DEBUG
     handlers: []
-    propagate: yes
+    propagate: yes