[Haskell-cafe] hslogger bugs or features?

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Sun Feb 1 08:53:57 EST 2009


On 2009 Jan 31, at 20:28, Marc Weber wrote:
>  tmp %./test1
>  /tmp nixos
>  ALERT test, should be shown and should create the sublogger
>  ALERT test, should not be shown cause we have changed to EMERGENCY
>
> which is quite confusing because I haven't told hslogger explicitely
> to use a log level printing ALERTs on "A.B.C". so I'd expect that only
> the first message is shown. This behaviour is explained by the
> inheritance of the loglevel when hslogger creates them (without
> attaching handlers) automatically.
>
> I don't want the logging behaviour depend on wether a log line has  
> been
> emitted before or not.
> Do you agree? Have I missed something?


At least some of what you've missed is that this is inherited from the  
C syslog library; possibly this should be using withSysLog (options)  
$ ... to bracket a use of syslog with appropriate openlog()/closelog()  
and changing top level options should only be attempted in the  
openlog() call.

-- 
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH


-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090201/9cbce059/PGP.bin


More information about the Haskell-Cafe mailing list