Traceback in Logging

Vinay Sajip vinay_sajip at
Tue Jan 6 17:01:01 CET 2009

On Jan 6, 1:33 pm, Kottiyath <n.kottiy... at> wrote:
> This seems somewhat kludgy. Is it possible in logging mechanism itself
> to provide traceback as default?

No, because it's not a common use case to print tracebacks for every
logging call. There's support for adding traceback information in
exception handling, via use of the Logger.exception method in the
exception handling code.

> I use Python2.4, so LoggingAdapter is not there too.

If you need LoggingAdapter, you can always copy and paste the relevant
code from Python's SVN repository into your own application.


Vinay Sajip

More information about the Python-list mailing list