For the background to this problem please see my Stack Overflow
question here [1].

I recently had to do some head-scratching over Django 1.3's logging
configuration, because with DEBUG=True the 'django.request' logger
isn't called when an uncaught exception occurs during a request.

It wasn't obvious at all to me that 500 errors are only processed by
the logger when not in debug mode. This behaviour made sense when the
only error processing was to send an email to the site admins, but now
we're free to add more handlers to the logger and may want some of
them to be enabled in development as well as in production.

Is there a reason the call to logger.error can't come before we return
the technical_500_response when DEBUG=True? It seems to me that the
debug level should be checked in each individual handler, rather than
determining whether the error is passed to the logger at all.

Regards,
Matt.


[1] 
http://stackoverflow.com/questions/6305132/django-1-3-logging-500-errors-are-not-logged

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com.
To unsubscribe from this group, send email to 
django-developers+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-developers?hl=en.

Reply via email to