Traceback in Logging
vinay_sajip at yahoo.co.uk
Tue Jan 6 17:01:01 CET 2009
On Jan 6, 1:33 pm, Kottiyath <n.kottiy... at gmail.com> 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.
More information about the Python-list