Message112063
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> |
|
Date |
User |
Action |
Args |
2010-07-30 11:25:48 | guettli | set | recipients:
+ guettli |
2010-07-30 11:25:48 | guettli | set | messageid: <1280489148.4.0.967800282636.issue9427@psf.upfronthosting.co.za> |
2010-07-30 11:25:47 | guettli | link | issue9427 messages |
2010-07-30 11:25:46 | guettli | create | |
|