Save Django Request Logs In A File
Django shows the requests logs in command line, I want to save that logs in a file. I found a solution here but it saves the logs only that we print manually. Can we save all of th
Solution 1:
To log the Django request debug events, check out my answer here about using the fail-nicely-django config. You will also get 4xx and 5xx request events logged from Django's default loggers.
Note, though, that 2xx requests generally don't get logged by Django, if that's what you are after (only runserver
shows them in the console). There is a workaround mentioned here, but you should generally use your server's access logs for these in production (e.g. access.log in nginx/Apache).
Post a Comment for "Save Django Request Logs In A File"