[New-bugs-announce] [issue15541] logging.exception doesn't accept 'extra'
report at bugs.python.org
Thu Aug 2 23:52:13 CEST 2012
New submission from Ned Batchelder:
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)
components: Library (Lib)
title: logging.exception doesn't accept 'extra'
versions: Python 2.7, Python 3.2
Python tracker <report at bugs.python.org>
More information about the New-bugs-announce