On Fri, Oct 17, 2008 at 9:40 AM, Heston James - Cold Beans
<heston.james@c oldbeans.co.ukw rote:
Use format_exc() in the 'traceback' module to get a string for the
current stack trace (and exception) and log that.
Cheers,
Chris
--
Follow the path of the Iguana...
<heston.james@c oldbeans.co.ukw rote:
Afternoon Guys,
>
I'm currently logging exceptions within my applications like so:
>
try:
#do something....
except Exception, error:
# Log the exception.
self.logger.err or("Exception Occurred: (%s)" % str(error))
>
>
This is quite fine, however, sometimes I get very vague error message thrown
at me which don't help a great deal. How can I log the full exception and
backtrace as if it were thrown to stderr and I wasn't catching it?
>
I'm currently logging exceptions within my applications like so:
>
try:
#do something....
except Exception, error:
# Log the exception.
self.logger.err or("Exception Occurred: (%s)" % str(error))
>
>
This is quite fine, however, sometimes I get very vague error message thrown
at me which don't help a great deal. How can I log the full exception and
backtrace as if it were thrown to stderr and I wasn't catching it?
current stack trace (and exception) and log that.
Cheers,
Chris
--
Follow the path of the Iguana...
>
Cheers all,
Heston
>
--
>
Cheers all,
Heston
>
--
>