log-warper-1.8.1: Flexible, configurable, monadic and pretty logging

CopyrightCopyright (C) 2004-2011 John Goerzen
LicenseBSD3
MaintainerJohn Goerzen <jgoerzen@complete.org>
Stabilityprovisional
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

System.Wlog.LogHandler.Simple

Contents

Description

Simple log handlers

Written by John Goerzen, jgoerzen@complete.org

Synopsis

Documentation

defaultHandleAction :: Handle -> Text -> IO () Source #

Default action which just prints to handle using given message.

Custom handlers

fileHandler :: FilePath -> Severities -> 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.

streamHandler :: Handle -> (Handle -> Text -> IO ()) -> MVar () -> Severities -> 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.