I hope you can help me, I am using this code to store the log of my application with django 1.10 but I continue to generate the log of a large size (more than 200mb and increasing), I would like to know how to make it to generate a more small and and if it is possible that it is overwritten, and if it is possible to put in one file the DEBUG and in another the ERROR. Thanks.
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'verbose': {
'format': '%(levelname)s %(asctime)s %(module)s %(process)d %(thread)d %(message)s'
},
'simple': {
'format': '%(levelname)s %(message)s'
},
},
'handlers': {
'file': {
'level': 'DEBUG',
'class': 'logging.handlers.RotatingFileHandler',
'filename': '/home/elros/logs/debug.log',
'maxBytes': 1024*1024*16,
'formatter': 'verbose'
},
},
'loggers': {
'django': {
'handlers': ['file'],
'level': 'DEBUG',
'propagate': True,
},
},
}