yet-another-logger-0.2.3: Yet Another Logger

CopyrightCopyright © 2015 PivotCloud, Inc.
LicenseApache-2.0
MaintainerLars Kuhtz <lkuhtz@pivotmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

System.Logger

Contents

Description

This module re-exports the logger interface from System.Logger.Types and the implementation of that interface from System.Logger.Logger and System.Logger.Backend.Handle.

Synopsis

Documentation

withConsoleLogger :: (MonadIO m, MonadBaseControl IO m) => LogLevel -> LoggerT Text m α -> m α Source

A simple console logger

import System.Logger

main ∷ IO ()
main = withConsoleLogger Info $ do
    logg Info "moin"
    withLabel ("function", "f") f
    logg Warn "tschüss"
  where
    f = withLevel Debug $ do
        logg Debug "debug f"

withFileLogger :: (MonadIO m, MonadBaseControl IO m) => FilePath -> LogLevel -> LoggerT Text m α -> m α Source

A simple file logger

Logger Interface

Yet Another Logger

Handle Backend

Logging System Configuration

pLogConfig_ Source

Arguments

:: Text

prefix for this and all subordinate command line options.

-> MParser LogConfig 

A version of pLogConfig that takes a prefix for the command line option.

@since 0.2