python-oops-wsgi doesn't record oops reports from Django's WSGI app

Bug #830981 reported by James Henstridge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Django
New
Unknown
python-oops-wsgi
Invalid
High
Unassigned

Bug Description

This may be better fixed in Django itself, but I thought I would report it here as well anyway since replacing wsgi-oops is one of the goals of this code base and it handles Django apps (albeit in a hacky way).

It seems that Django's WSGI application does not report the exception context to its container when it handles an error and displays an error page.

The way we're currently handling this is by (a) customising the Django Handler class we use to log the exception via the stdlib logging module, and (b) wsgi-oops collects the logged exceptions during the request.

A better solution would be for Django itself to do the right thing and not require this convoluted method of capturing the data.

Graham Binns (gmb)
Changed in python-oops-wsgi:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Robert Collins (lifeless) wrote :

Sadly I've found other things like web.py and flask also have this noddy approach. logging is in the standard library, so I think the glue for snarfing from logging output should be in python-oops itself.

Changed in django:
status: Unknown → New
Revision history for this message
James Henstridge (jamesh) wrote :

Just to be clear, logging of the exceptions using the stdlib logging module is not a standard part of Django: this is a customisation we made within the Ubuntu One servers in order to capture the exceptions for wsgi-oops.

Capturing log messages in general is probably worth while doing regardless of the state of Django though: it has the potential to capture useful debug info.

Revision history for this message
Robert Collins (lifeless) wrote :

Sure, I agree. What parts of this should be within python-oops-wsgi ?

Revision history for this message
Robert Collins (lifeless) wrote :

so while python-oops-wsgi should totally work with django, that may require either a) django changes to be wsgi compliant, or b) some thing django specific.

In b) I think we'd want a new python-oops-django module (heck we may want that anyway) so this bug really isn't relevant to pure -wsgi. Closing its task here, future decisions can be future decisions :)

Changed in python-oops-wsgi:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.