I am trying to configure my django settings.py
to properly use the python logging facility but I've stumbled upon a rather strange problem:
Even after reading the docs, I simply can't find out how to redirect the console printed debug request lines from Django to a file I've specified; Below is part of my logging 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 keep seeing my console print line of the following format:
[19/Dec/2014 11:48:03] "POST /api/v1/ HTTP/1.1" 200 10
How may I redirect these to a file using the logging facility?
Thanks in advance