Message56525
| Author |
theller |
| Recipients |
theller |
| Date |
2007年10月18日.15:30:35 |
| SpamBayes Score |
0.019560572 |
| Marked as misclassified |
No |
| Message-id |
<1192721436.77.0.0263561863659.issue1295@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
| Files |
| File name |
Uploaded |
|
logging.patch
|
theller,
2007年10月18日.15:30:35
|
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2007年10月18日 15:30:37 | theller | set | spambayes_score: 0.0195606 -> 0.019560572 recipients:
+ theller |
| 2007年10月18日 15:30:36 | theller | set | spambayes_score: 0.0195606 -> 0.0195606 messageid: <1192721436.77.0.0263561863659.issue1295@psf.upfronthosting.co.za> |
| 2007年10月18日 15:30:36 | theller | link | issue1295 messages |
| 2007年10月18日 15:30:35 | theller | create |
|