Sun, 28 Jan 2018 12:00:18 +0000
files log config
borgend/loggers.py | file | annotate | diff | comparison | revisions |
--- 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)