Django shows the requests logs in command line, I want to save that logs in a file. I found a solución aquí but it saves the logs only that we print manually. Can we save all of the request and response logs in a separate file?
preguntado el 28 de mayo de 14 a las 12:05
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 aquí, but you should generally use your server's access logs for these in production (e.g. acceso.log in nginx/Apache).
This should work on both linux and windows I hope:
python manage.py runserver > logs.txt