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

Marc Weber marco-oweber at gmx.de
Tue Feb 3 04:19:26 EST 2009

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:

  import logging
                      format='%(asctime)s %(levelname)s %(message)s',


  loggerSub = logging.getLogger('A.B.C')

  loggerSub.critical('CRITICAL test, should be shown and should create the sublogger')

  loggerSub.debug('WARNING test, should not be shown cause we have changed to WARNING')

which only logs the first line but not the second one
  2009-02-03 11:14:52,058 CRITICAL CRITICAL test, should be shown and should create the sublogger

hackage hslogger does clone the priority setting for A.B.C (in getLogger).
The cloned value is no longer affected by when changing the top level logging
So this example makes hackage hslogger log both lines.

So I consider this a beeing a (small) bug.

Marc Weber

More information about the Haskell-Cafe mailing list