>From: [email protected] [mailto:[EMAIL PROTECTED]
>On Behalf Of Michel Albert
>
>How can I get Tracebacks to be logged in production environment? This
>seems to be a common problem, based on the number of results I got
>when searching this mailing list and google. However, none of the
>solutions is satisfactory. What is the Right Way to do it?
Basically, hook into CherryPy's error handler, there start a new DB transaction
in which you let the exception's details be stored - if possible. Else, define
your own logger in {dev,prod}.cfg [2] and have e.g., syslog-ng [1] do the
mailing and database transactions for you.
In order to implement that I use an altered version of Christopher Arndt's
ErrorReporting [3,4]. It is activated in production mode as well as development
mode.
If in the latter the error gets displayed to the user (=developer),
else a nice Error 500 page will be shown and the error page is mailed to me as
HTML [5] with details being logged in database as TODO list for QA and
automated test-case creation as well as "replay" functionality.
Critical errors get pushed to my PDA by syslog-ng by a custom logging rule. (by
the program() destination)
-- Mark
[1] http://www.balabit.com/network-security/syslog-ng/opensource-logging-system/
[2] http://docs.turbogears.org/1.0/LoggingSystem
[3] http://docs.turbogears.org/1.0/ErrorReporting
[4]
http://groups.google.de/group/turbogears/browse_thread/thread/7305f1343f381e3b/5dfdca6794223542#5dfdca6794223542
[5]
http://groups.google.de/group/turbogears/browse_thread/thread/3ff3d6be2cd1524f/d23ecb2251d0707c
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---