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

System.Wlog.Terminal

Description

Logging functionality. This module is wrapper over hslogger, which allows to keep logger name in monadic context.

Synopsis

# Documentation

Arguments

 :: MonadIO m => (UTCTime -> Text) -> (Handle -> Text -> IO ()) -> Bool Show time? -> Bool Show ThreadId? -> Maybe Severities -> Maybe Severities -> m ()

This function initializes global logging system for terminal output. At high level, it sets severity which will be used by all loggers by default, sets default formatters and sets custom severity for given loggers (if any).

NOTE: you probably don't want to use this function. Consider setupLogging.

On a lower level it does the following: 1. Removes default handler from root logger, sets two handlers such that: 1.1. All messages are printed to stdout. 1.2. Moreover messages with at least Error severity are printed to stderr. 2. Sets given Severity to root logger, so that it will be used by descendant loggers by default. 3. Applies setSeverity to given loggers. It can be done later using setSeverity directly.