heavy-logger-0.3.2.1: Full-weight logging based on fast-logger

Safe HaskellNone
LanguageHaskell2010

System.Log.Heavy.Backends

Contents

Description

This module contains implementation of most commonly used logging backends. You can write your own backends, by implementing an instance of IsLogBackend type class.

Synopsis

Documentation

This module contains several implementation of logging backend. A backend is some kind of target, where your messages will go. Each backend has its own specific settings.

Backends provided are:

  • Fast-logger backend. It allows to write messages to stdout, stderr or arbitrary file.
  • Syslog backend.
  • Chan backend.
  • Null backend. This discards all messages. Can be used to disable logging.

There are also some backend combinators:

  • Filtering - passes messages, that match specified filter, to underlying backend.
  • FilteringM - similar to Filtering, but allows to change the filter in runtime.
  • Parallel - writes messages to several backends in parallel.
  • Dynamic - allows to change underlying backend or its settings in runtime.

data NullBackend Source #

Null logging backend, which discards all messages (passes them to devnull, if you wish). This can be used to disable logging.

data Filtering b Source #

Messages filtering backend. This backend passes a message to underlying backend, if this message conforms to specified filter.

filtering :: IsLogBackend b => LogFilter -> LogBackendSettings b -> LogBackendSettings (Filtering b) Source #

Specify filter as LogFilter.

data family LogBackendSettings b Source #

Logging backend settings data type

Instances
data LogBackendSettings AnyLogBackend Source # 
Instance details

Defined in System.Log.Heavy.Types

data LogBackendSettings DynamicBackend Source # 
Instance details

Defined in System.Log.Heavy.Backends.Dynamic

data LogBackendSettings NullBackend Source # 
Instance details

Defined in System.Log.Heavy.Backends

data LogBackendSettings ParallelBackend Source # 
Instance details

Defined in System.Log.Heavy.Backends

data LogBackendSettings ChanLoggerBackend Source # 
Instance details

Defined in System.Log.Heavy.Backends

data LogBackendSettings SyslogBackend Source # 
Instance details

Defined in System.Log.Heavy.Backends

data LogBackendSettings FastLoggerBackend Source # 
Instance details

Defined in System.Log.Heavy.Backends

data LogBackendSettings (FilteringM b) Source # 
Instance details

Defined in System.Log.Heavy.Backends.Dynamic

data LogBackendSettings (Filtering b) Source # 
Instance details

Defined in System.Log.Heavy.Backends

Default settings

defStdoutSettings :: LogBackendSettings FastLoggerBackend Source #

Default settings for fast-logger stdout output

defStderrSettings :: LogBackendSettings FastLoggerBackend Source #

Default settings for fast-logger stderr output

defFileSettings :: FilePath -> LogBackendSettings FastLoggerBackend Source #

Default settings for fast-logger file output. This implies log rotation when log file size reaches 10Mb.

defaultSyslogSettings :: LogBackendSettings SyslogBackend Source #

Default settings for syslog backend

defaultSyslogFormat :: Format Source #

Default log message format fof syslog backend: [{level}] {source}: {message}