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 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:13nedbatsetrecipients: + nedbat
2012-08-02 21:52:13nedbatsetmessageid: <1343944333.27.0.175563876294.issue15541@psf.upfronthosting.co.za>
2012-08-02 21:52:12nedbatlinkissue15541 messages
2012-08-02 21:52:12nedbatcreate