Message167260
| Author |
nedbat |
| Recipients |
nedbat |
| Date |
2012年08月02日.21:52:12 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1343944333.27.0.175563876294.issue15541@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
The logging.exception method differs from .debug(), .info(), .warning(), .error() and .critical() in that it does not accept an `extra` keyword argument. There seems to be no reason for this.
The docs are misleading about this. They say, "The arguments are interpreted as for debug()."
Changing exception() to this would take care of it::
def exception(self, msg, *args, **kwargs):
"""
Convenience method for logging an ERROR with exception information.
"""
kwargs['exc_info'] = 1
self.error(msg, *args, **kwargs) |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年08月02日 21:52:13 | nedbat | set | recipients:
+ nedbat |
| 2012年08月02日 21:52:13 | nedbat | set | messageid: <1343944333.27.0.175563876294.issue15541@psf.upfronthosting.co.za> |
| 2012年08月02日 21:52:12 | nedbat | link | issue15541 messages |
| 2012年08月02日 21:52:12 | nedbat | create |
|