Relative Content

Tag Archive for python-3.xloggingpython-loggingdjango-logging

TimeRotatingFileHandler create new file after restarting the server only in logging library Django

I am using Django logging library to log the data. I am using class-“logging.handlers.TimedRotatingFileHandler” with parameter “when” : “M” and “backupCount” 5. So, it will create new file every minute and keep 5 latest files in backup and delete the older file. Here, the file is only created if I restart the server. Any idea, how to create file automatically every minute?