[New-bugs-announce] [issue9427] logging.error('...', exc_info=True) should display upper frames, too

Thomas Guettler report at bugs.python.org
Fri Jul 30 13:25:48 CEST 2010


New submission from Thomas Guettler <guettli at thomas-guettler.de>:

logging.error('...', exc_info=True) only displays the
frames downward. But I often need the upper frames, to debug a problem.

This example shows, that you don't see the "upper" frame in the stactrace. But that's information is important.

<pre>
import logging

def foo():
    try:
        raise Exception()
    except Exception, exc:
        logging.error('Exception occured: %s' % exc, exc_info=True)

def upper():
    foo()
upper()
</pre>

<pre>
===> python tmp/t.py
ERROR:root:Exception occured: 
Traceback (most recent call last):
  File "tmp/t.py", line 6, in foo
    raise Exception()
Exception
</pre>

----------
components: Library (Lib)
messages: 112063
nosy: guettli
priority: normal
severity: normal
status: open
title: logging.error('...', exc_info=True) should display upper frames, too
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9427>
_______________________________________


More information about the New-bugs-announce mailing list