diff --git a/plenum/config.py b/plenum/config.py index 77dec3a5eb..8f5ad003f6 100644 --- a/plenum/config.py +++ b/plenum/config.py @@ -149,11 +149,11 @@ # Log configuration -logRotationWhen = 'D' +logRotationWhen = 'W' logRotationInterval = 1 -logRotationBackupCount = 10 +logRotationBackupCount = 50 logRotationMaxBytes = 100 * 1024 * 1024 -logRotationCompress = False +logRotationCompress = True logFormat = '{asctime:s} | {levelname:8s} | {filename:20s} ({lineno: >4}) | {funcName:s} | {message:s}' logFormatStyle = '{' logLevel = logging.NOTSET diff --git a/stp_core/common/logging/TimeAndSizeRotatingFileHandler.py b/stp_core/common/logging/TimeAndSizeRotatingFileHandler.py index 7967c74c15..f831c4386b 100644 --- a/stp_core/common/logging/TimeAndSizeRotatingFileHandler.py +++ b/stp_core/common/logging/TimeAndSizeRotatingFileHandler.py @@ -1,4 +1,5 @@ -import os, gzip +import os +import gzip from logging.handlers import TimedRotatingFileHandler from logging.handlers import RotatingFileHandler @@ -17,7 +18,7 @@ def __init__(self, filename, when='h', interval=1, backupCount=0, def shouldRollover(self, record): return bool(TimedRotatingFileHandler.shouldRollover(self, record)) or \ - bool(RotatingFileHandler.shouldRollover(self, record)) + bool(RotatingFileHandler.shouldRollover(self, record)) def rotate(self, source, dest): source_gz = source.endswith(".gz") diff --git a/stp_core/config.py b/stp_core/config.py index 35f10fe04e..843bb77533 100644 --- a/stp_core/config.py +++ b/stp_core/config.py @@ -7,11 +7,11 @@ baseDir = os.getcwd() # Log configuration -logRotationWhen = 'D' +logRotationWhen = 'W' logRotationInterval = 1 -logRotationBackupCount = 10 +logRotationBackupCount = 50 logRotationMaxBytes = 100 * 1024 * 1024 -logRotationCompress = False +logRotationCompress = True logFormat = '{asctime:s} | {levelname:8s} | {filename:20s} ({lineno:d}) | {funcName:s} | {message:s}' logFormatStyle = '{'