I'm just an idiot when it comes logging

olsongt at verizon.net olsongt at verizon.net
Wed Mar 23 14:35:07 CET 2005


Vinay Sajip wrote:
> <olsongt <at> verizon.net> writes:
>
>
> Handlers normally process all events passed to them, but you can set
a level on
> a handler to get it to drop events below a certain threshold. Since
you haven't
> done this, you will see an INFO message appear even though the root
logger's
> level is set to ERROR. (This would only affect logging calls to the
root logger).
>
> Rule of thumb: Set levels on handlers only when you need them, not as
common
> practice. If you don't want to see info messages from otherLogger,
set its level
> to > INFO.
>
> Vinay Sajip

Thanks Vinay,

By adding a handler with a level of ERROR I fixed my problem.  Things
are starting to make sense.  I just feel like a logger should filter
out any messages below its error level instead of sending them to its
handlers.  But that is obviously not the case.  I just need to get used
to it.

-Grant




More information about the Python-list mailing list