logging-facade-0.3.1: Simple logging abstraction that allows multiple back-ends
Safe HaskellNone
LanguageHaskell2010

System.Logging.Facade.Sink

Synopsis

Documentation

type LogSink = LogRecord -> IO () Source #

A consumer for log records

defaultLogSink :: IO LogSink Source #

A thread-safe log sink that writes log messages to stderr

getLogSink :: IO LogSink Source #

Return the global log sink.

setLogSink :: LogSink -> IO () Source #

Set the global log sink.

swapLogSink :: LogSink -> IO LogSink Source #

Return the global log sink and set it to a new value in one atomic operation.

withLogSink :: LogSink -> IO () -> IO () Source #

Set the global log sink to a specified value, run given action, and finally restore the global log sink to its previous value.