Use WatchedFileHandler rather than TimedRotatingFileHandler.

TimedRotatingFileHandler does not properly handle multiple processes
writing logs at the same time, and thus can end up losing data.
This commit is contained in:
Tim Abbott 2016-08-12 20:39:43 -07:00 committed by Tim Abbott
parent f999f63999
commit d876fac01a
1 changed files with 2 additions and 8 deletions

View File

@ -893,21 +893,15 @@ LOGGING = {
},
'file': {
'level': 'DEBUG',
'class': 'logging.handlers.TimedRotatingFileHandler',
'class': 'logging.handlers.WatchedFileHandler',
'formatter': 'default',
'filename': FILE_LOG_PATH,
'when': 'D',
'interval': 7,
'backupCount': 100000000,
},
'errors_file': {
'level': 'WARNING',
'class': 'logging.handlers.TimedRotatingFileHandler',
'class': 'logging.handlers.WatchedFileHandler',
'formatter': 'default',
'filename': ERROR_FILE_LOG_PATH,
'when': 'D',
'interval': 7,
'backupCount': 100000000,
},
},
'loggers': {