Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Bugs

[issue15541] logging.exception doesn't accept 'extra'

 

 

Python bugs RSS feed   Index | Next | Previous | View Threaded


report at bugs

Aug 2, 2012, 2:52 PM

Post #1 of 5 (74 views)
Permalink
[issue15541] logging.exception doesn't accept 'extra'

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 <report [at] bugs>
<http://bugs.python.org/issue15541>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 4, 2012, 2:44 PM

Post #2 of 5 (68 views)
Permalink
[issue15541] logging.exception doesn't accept 'extra' [In reply to]

Changes by R. David Murray <rdmurray [at] bitdance>:


----------
nosy: +vinay.sajip

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15541>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 4, 2012, 3:43 PM

Post #3 of 5 (70 views)
Permalink
[issue15541] logging.exception doesn't accept 'extra' [In reply to]

Roundup Robot added the comment:

New changeset 322da186cced by Vinay Sajip in branch '2.7':
Issue #15541: Correct anomaly in logging.exception. Thanks to Ned Batchelder for the report.
http://hg.python.org/cpython/rev/322da186cced

----------
nosy: +python-dev

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15541>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 4, 2012, 3:44 PM

Post #4 of 5 (67 views)
Permalink
[issue15541] logging.exception doesn't accept 'extra' [In reply to]

Changes by Vinay Sajip <vinay_sajip [at] yahoo>:


----------
assignee: -> vinay.sajip
resolution: -> fixed
status: open -> closed
versions: -Python 3.2

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15541>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com


report at bugs

Aug 5, 2012, 1:41 AM

Post #5 of 5 (72 views)
Permalink
[issue15541] logging.exception doesn't accept 'extra' [In reply to]

Florent Xicluna added the comment:

Python 3.2 was already fixed with changeset ba014543ed2c.

It would be nice to have some tests, though.

----------
nosy: +flox

_______________________________________
Python tracker <report [at] bugs>
<http://bugs.python.org/issue15541>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/list-python-bugs%40lists.gossamer-threads.com

Python bugs RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.