Repeated output when logging exceptions

Chris Withers chris at simplistix.co.uk
Wed Sep 30 15:53:08 CEST 2009


Vinay Sajip wrote:
> I'm not sure why you need all the code you've posted. The logging
> package allows you to add tracebacks to your logs by using the
> exception() method, which logs an ERROR with a traceback and is
> specifically intended for use from within exception handlers. 

You can also use the exc_info=True parameter with any logging method...

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
            - http://www.simplistix.co.uk



More information about the Python-list mailing list