[mod_python] Trapping output from importer.ReportError

Chris Rilly chrispwd at gmail.com
Fri Mar 16 09:25:13 EST 2007


Hello,

I have a custom logging class in our application that we use (writes to
file, not to apache logs).

What I would like to do is when an internal server error happens, log the
traceback to the file via our logger and not the apache error log. I noticed
in the importer module there is a method called "ReportError".  The exact
output thats being emitted from that method is what I would like to capture.

I'm somewhat new to mod_python, but is there a way to override or get the
traceback from that method? My application is making use of the publisher
handler.

Off to the side a bit, after the traceback is logged, I would want to
redirect the user to a specific page instead of the default "Internal server
error" page.

Thank you!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20070316/5065a286/attachment.html


More information about the Mod_python mailing list