log-warper-1.0.4: 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.Handler

Contents

Description

Definition of log handler support

For some handlers, check out System.WLog.Handler.Simple and System.WLog.Handler.Syslog.

Please see System.WLog.Logger for extensive documentation on the logging system.

Written by John Goerzen, jgoerzen@complete.org

Synopsis

Basic Types

class LogHandler a where Source #

This is the base class for the various log handlers. They should all adhere to this class.

Minimal complete definition

getTag, setLevel, getLevel, setFormatter, emit, close

Methods

getTag :: a -> String Source #

Tag of handler. Is arbitrary. Made for identication.

setLevel :: a -> Severity -> a Source #

Sets the log level. handle will drop items beneath this level.

getLevel :: a -> Severity Source #

Gets the current level.

setFormatter :: a -> LogFormatter a -> a Source #

Set a log formatter to customize the log format for this Handler

getFormatter :: a -> LogFormatter a Source #

handle :: a -> LogRecord -> String -> IO () Source #

Logs an event if it meets the requirements given by the most recent call to setLevel.

emit :: a -> LogRecord -> String -> IO () Source #

Forces an event to be logged regardless of the configured level.

close :: a -> IO () Source #

Closes the logging system, causing it to close any open files, etc.

Instances

LogHandler SyslogHandler Source # 
LogHandler RollerHandler Source # 
Typeable * a => LogHandler (GenericHandler a) Source #