I am trying to configure django settings.py
to use the python settings.py
correctly, but I came across a rather strange problem:
Even after reading the docs, I just canβt find out how to redirect deleted console debug request lines from Django to the file I specified; Below is my registration configuration.
LOGGING = { 'version': 1, 'formatters': { 'simple': { 'format': '%(levelname)s %(message)s' }, } 'handlers': { 'file_http': { 'level': 'DEBUG', 'class': 'logging.FileHandler', 'filename': r'C:\mysystem-http.log', 'formatter': 'verbose' } }, 'loggers': { 'django.request': { 'handlers': ['file_http'], 'level': 'DEBUG', 'propagate': False } } }
I continue to see my console print line in the following format:
[19/Dec/2014 11:48:03] "POST /api/v1/ HTTP/1.1" 200 10
How can I redirect them to a file using the logger?
Thank you in advance
source share