I think there's a bug in the logging package. It defines a setLevel() method on Handler objects, but I can't find any explanation of what it does. I checked the code and calling setLevel() sets an attribute that is never read. I expected setLevel() to be a way to filter out messages below a certain level. Is that the intended effect? If so, I'd be happy to fix it so that it worked. Jeremy
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. Jeremy
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
participants (2)
-
Jeremy Hylton
-
Vinay Sajip