Odhiambo Washington wrote:
In my case, I took a different approach with Django's logging configuration:
'handlers': { 'file': { 'level': 'INFO', 'class': 'logging.handlers.TimedRotatingFileHandler', 'filename': '/opt/mailman/mm/var/logs/mailmanweb.log', 'when': 'D', # specifies the interval 'interval': 1, # defaults to 1, only necessary for other values 'backupCount': 5, # how many backup file to keep, 5 days 'formatter': 'simpleRe', }, },
Thanks for this suggestion. I've just implemented this on my own setup. If you're using mailman-web you can add the following lines as a minimum configuration (example):
LOGGING['handlers']['file']['class'] = 'logging.handlers.TimedRotatingFileHandler' LOGGING['handlers']['file']['when'] = 'midnight' LOGGING['handlers']['file']['backupCount'] = 5
Thanks. Andrew.