yet-another-logger-0.1: 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