Python-list Digest, Vol 76, Issue 303

Gabriel Genellina gagsl-py2 at yahoo.com.ar
Sat Jan 30 01:02:14 CET 2010


[top posting corrected]

> From: Steve Holden <steve at holdenweb.com>
> Date: Tue, 26 Jan 2010 11:54:23 -0500

> Anyway, I suspect your error might go away if you turned the first
> argument of hte log.info() call into a format string such as
>
>  log.info("refer: %s", ret)
>
>> try:
>>    log.info("start")
>>    log.info("refer",ret)
>>    log.info("end")
>> except TypeError:
>>    log.exception("Exception raised")

En Fri, 29 Jan 2010 06:17:56 -0300, siddhartha veedaluru  
<siddhartha.veedaluru at gmail.com> escribió:

> Thats the output i got in output window.it is not listing the statement
> which caused it. copy paste and try it on you setup. it behaves the same
> way.
>
> I know that error is in log.info() function call.but it is not caught by
> "except". which is not getting logged using log.exception

Errors that occur inside the logging system are not logged themselves  
(users aren't usually interested on those kind of errors, but on  
application errors; also, if logging errors were logged too, this could  
create an infinite loop).

To handle those errors in the logging system yourself, override  
Handler.handleError()

-- 
Gabriel Genellina




More information about the Python-list mailing list