{‘file’: {‘level’: ‘DEBUG’,
‘class’: ‘logging.handlers.TimedRotatingFileHandler’,
‘filename’: os.path.join(LOG_PATH, ‘temp.log’),
‘when’: ‘s’,
‘interval’: 10, #rotates/creates new logs every 10 seconds
}
I have the above piece of code as a handler in my LOGGING configuration. The logging doesn’t work as expected, new log files are created at random timestamps and not every 10 seconds. How to resolve this. My project runs in a docker container and there are many files that use logging.
As additional info LOG_PATH is in the /opt directory of linux filesystem