[Python-Dev] Handler.setLevel()

Vinay Sajip vinay_sajip@red-dove.com
Wed, 18 Jun 2003 23:06:29 +0100


> On Wed, 2003-06-18 at 12:11, Jeremy Hylton wrote:
> > I think there's a bug in the logging package.
>
> Never mind.  I wasn't setting the level correctly.  After figuring out
> how to set the level correctly, I figured out how it uses
> getEffectiveLevel() to read the level attribute.
>

OK. The handler level is checked in Logger.callHandlers(), whereas the
logger level is checked in calls such as Logger.info(), Logger.debug() etc.
The getEffectiveLevel() call returns a logger level - either one set in the
logger for which getEffectiveLevel() is called, or the nearest ancestor
logger which has a level set.

Vinay