Browse Source

Rotate at midnight instead of size-based

David Baker 5 years ago
parent
commit
25bed3611c
1 changed files with 2 additions and 2 deletions
  1. 2 2
      sydent/sydent.py

+ 2 - 2
sydent/sydent.py

@@ -97,8 +97,8 @@ class Sydent:
 
         logPath = self.cfg.get('general', "log.path")
         if logPath != '':
-            handler = logging.handlers.RotatingFileHandler(
-                logPath, maxBytes=(1000 * 1000 * 100), backupCount=365
+            handler = logging.handlers.TimedRotatingFileHandler(
+                logPath, when='midnight', backupCount=365
             )
             handler.setFormatter(formatter)
             def sighup(signum, stack):