[Answered ]-Django logging throws 500 internal server error

1👍

Could it be related to permissions? I can imagine that in a web-server environment, writing to a file may be restricted. In truth, I don’t know, but please check the official Django logging documentation – it uses the standard logging module, but you may have to configure it differently.

1👍

Is that your entire view? It would have been helpful to post the actual traceback, but note that a view must return an HttpResponse, even if it’s an empty one. So if that is your entire view, the 500 error is probably happening because you’re not returning anything.

Add return HttpResponse() to the end of that view, and if that still doesn’t work, please post the traceback itself.

Leave a comment