Location of Django logs and errors

后端 未结 3 1776
北海茫月
北海茫月 2020-12-04 08:31

I\'ve set up django server with nginx, and it gets 403 error in some of the pages.

Where can I find the django logs? where can I see the errors in detail?

3条回答
  •  情话喂你
    2020-12-04 09:18

    Setup https://docs.djangoproject.com/en/dev/topics/logging/ and then these error's will echo where you point them. By default they tend to go off in the weeds so I always start off with a good logging setup before anything else.

    Here is a really good example for a basic setup: https://ian.pizza/b/2013/04/16/getting-started-with-django-logging-in-5-minutes/

    Edit: The new link is moved to: https://github.com/ianalexander/ianalexander/blob/master/content/blog/getting-started-with-django-logging-in-5-minutes.html

提交回复
热议问题