I save the logs to the file with this configuration. But I could not log the client ip address.
I also want to keep logs for 1 day.
Is there a simple method for this? Does anyone have an idea about this?
django-requestlogging
I tried this library but failed. I do not know if it is up to date. Thanks
LOGGING ={ 'version':1, 'loggers':{ 'django':{ 'handlers':['file','file2'], 'level':'DEBUG' } }, 'handlers':{ 'file':{ 'level':'INFO', 'class': 'logging.FileHandler', 'filename':'./logs/info.log', 'formatter':'simpleRe', }, 'file2':{ 'level':'DEBUG', 'class': 'logging.FileHandler', 'filename':'./logs/debug6.log', 'formatter':'simpleRe', } }, 'formatters':{ 'simpleRe': { 'format': ' {asctime} {levelname} {message} ', 'style': '{', } } }