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) messages: 167260 nosy: nedbat priority: normal severity: normal status: open title: logging.exception doesn't accept 'extra' type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue15541> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com