Feature request: log capture during testing

44 views
Skip to first unread message

Jody McIntyre

unread,
Apr 29, 2011, 3:20:25 PM4/29/11
to Django developers
Now that Django has logging support using the Python logging module,
it would be nice if the unit testing framework included the ability to
capture logs, similarly to the mail.outbox functionality.

I am aware of the log_capture decorator in the testfixtures package,
and we are using it for some tests. Unfortunately, it doesn't
correctly capture anything that's been changed by a filter, since it
installs itself as a handler without preserving filters attached to
existing handlers. It would be great if Django could do better!

Cheers,
Jody

sebastien piquemal

unread,
Apr 30, 2011, 4:21:00 AM4/30/11
to Django developers
Reply all
Reply to author
Forward
0 new messages