# HG changeset patch
# User Tuomo Valkonen <tuomov@iki.fi>
# Date 1517140818 0
# Node ID 7bcd715f19e37c92d551063746451be4c828dbf3
# Parent  a409242121d5d8d68639b28fc933c67bf53e5935
files log config

diff -r a409242121d5 -r 7bcd715f19e3 borgend/loggers.py
--- a/borgend/loggers.py	Sun Jan 28 11:54:46 2018 +0000
+++ b/borgend/loggers.py	Sun Jan 28 12:00:18 2018 +0000
@@ -19,6 +19,12 @@
 logfmt="%(asctime)s:%(levelname)s:%(name)s:%(message)s"
 fifo_capacity=1000
 fifo_fmt="%(asctime)s:%(levelname)s:%(message)s"
+fileslog_config={
+    'when': 'midnight',
+    'interval': 1,
+    'backupCount': 7
+    }
+
 
 #
 # Setting up the main logger with fifo, stderr, and rotating files output
@@ -46,7 +52,7 @@
 
 fileslog=logging.handlers.TimedRotatingFileHandler(
     os.path.join(locations.logs_dir, branding.appname+'.log'),
-    when='D', interval=1)
+    **fileslog_config)
 fileslog.setFormatter(logging.Formatter(logfmt))
 mainlogger.addHandler(fileslog)