Set error logs file handler to a rotating one

This commit is contained in:
Sylvain Bellemare 2017-04-18 12:02:43 +02:00 committed by Sylvain Bellemare
parent 82a170402e
commit 675d011a76

View File

@ -50,11 +50,13 @@ SUBSCRIBER_LOGGING_CONFIG = {
'level': logging.INFO, 'level': logging.INFO,
}, },
'errors': { 'errors': {
'class': 'logging.FileHandler', 'class': 'logging.handlers.RotatingFileHandler',
'filename': join(DEFAULT_LOG_DIR, 'bigchaindb-errors.log'), 'filename': join(DEFAULT_LOG_DIR, 'bigchaindb-errors.log'),
'mode': 'w', 'mode': 'w',
'level': logging.ERROR, 'maxBytes': 209715200,
'backupCount': 5,
'formatter': 'file', 'formatter': 'file',
'level': logging.ERROR,
}, },
}, },
'loggers': {}, 'loggers': {},