This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author theller
Recipients theller
Date 2007-10-18.15:30:35
SpamBayes Score 0.0195606
Marked as misclassified No
Message-id <>
I needed two logging handlers in my application, one notifiying the user
of errors, the other writing errors to a logfile.  So I created a custom
subclass of logging.Formatter and redefined the formatException() method
that returned a summary of the exception like 'ZeroDivisionError'
instead of the full traceback.

Unfortunately the logging record caches the result of the
handler.formatException() call in the exc_text variable, and the
formatException() method of the second handler isn't called at all.

The attached patch removes the caching and fixes the problem.
File name Uploaded
logging.patch theller, 2007-10-18.15:30:35
Date User Action Args
2007-10-18 15:30:37thellersetspambayes_score: 0.0195606 -> 0.0195606
recipients: + theller
2007-10-18 15:30:36thellersetspambayes_score: 0.0195606 -> 0.0195606
messageid: <>
2007-10-18 15:30:36thellerlinkissue1295 messages
2007-10-18 15:30:35thellercreate