hslogger-1.2.3: Versatile logging framework

Portabilityportable
Stabilityprovisional
MaintainerJohn Goerzen <jgoerzen@complete.org>
Safe HaskellNone

System.Log.Handler.Simple

Description

Simple log handlers

Written by John Goerzen, jgoerzen@complete.org

Synopsis

Documentation

streamHandler :: Handle -> Priority -> IO (GenericHandler Handle)Source

Create a stream log handler. Log messages sent to this handler will be sent to the stream used initially. Note that the close method will have no effect on stream handlers; it does not actually close the underlying stream.

fileHandler :: FilePath -> Priority -> IO (GenericHandler Handle)Source

Create a file log handler. Log messages sent to this handler will be sent to the filename specified, which will be opened in Append mode. Calling close on the handler will close the file.

data GenericHandler a Source

A helper data type.

Constructors

GenericHandler 

Fields

priority :: Priority
 
formatter :: LogFormatter (GenericHandler a)
 
privData :: a
 
writeFunc :: a -> String -> IO ()
 
closeFunc :: a -> IO ()
 

Instances

verboseStreamHandler :: Handle -> Priority -> IO (GenericHandler Handle)Source

Like streamHandler, but note the priority and logger name along with each message.