hslogger-1.0.7: Versatile logging frameworkContentsIndex
System.Log.Handler.Simple
Portabilityportable
Stabilityprovisional
MaintainerJohn Goerzen <jgoerzen@complete.org>
Description

Simple log handlers

Written by John Goerzen, jgoerzen@complete.org

Synopsis
streamHandler :: Handle -> Priority -> IO (GenericHandler Handle)
fileHandler :: FilePath -> Priority -> IO (GenericHandler Handle)
data GenericHandler a = GenericHandler {
priority :: Priority
privData :: a
writeFunc :: a -> LogRecord -> String -> IO ()
closeFunc :: a -> IO ()
}
verboseStreamHandler :: Handle -> Priority -> IO (GenericHandler Handle)
Documentation
streamHandler :: Handle -> Priority -> IO (GenericHandler Handle)
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)
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
A helper data type.
Constructors
GenericHandler
priority :: Priority
privData :: a
writeFunc :: a -> LogRecord -> String -> IO ()
closeFunc :: a -> IO ()
show/hide Instances
verboseStreamHandler :: Handle -> Priority -> IO (GenericHandler Handle)
Like streamHandler, but note the priority and logger name along with each message.
Produced by Haddock version 2.5.0