[Haskell-cafe] Re: hslogger bugs or features?

John Goerzen jgoerzen at complete.org
Tue Feb 3 10:57:24 EST 2009

Marc Weber wrote:
> Hi John,
> thank you for your feedback:
> I've taken the time to rewrite the example (issue1) using the python
> logging system. I came up with:

I think what you're noticing is the NOTSET level in Python.  Python
creates new loggers with the priority NOTSET, which means it searches up
the tree for a logger with a priority /= NOTSET, and uses the first
priority it finds.

hslogger doesn't have NOTSET, and each logger does have a specific priority.

The Python NOTSET priority does sound like a useful addition to
hslogger, though.  I think it would solve what you're after with minimal

> hackage hslogger does clone the priority setting for A.B.C (in getLogger).

Yes, I see that; looks like the docs are incorrect on that point.

But this only comes into play if you are changing the logging level on a
particular subset of a running program.  Does that really happen often
in practice?

I'd be happy to add NOTSET semantics to hslogger.

-- John

More information about the Haskell-Cafe mailing list