yet-another-logger-0.4.2: Yet Another Logger
CopyrightCopyright © 2015 PivotCloud Inc.
LicenseApache-2.0
MaintainerLars Kuhtz <lkuhtz@pivotmail.com>
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

System.Logger

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

data LogConfig Source #

Instances

Instances details
ToJSON LogConfig Source # 
Instance details

Defined in System.Logger

Generic LogConfig Source # 
Instance details

Defined in System.Logger

Associated Types

type Rep LogConfig :: Type -> Type #

Read LogConfig Source # 
Instance details

Defined in System.Logger

Show LogConfig Source # 
Instance details

Defined in System.Logger

Eq LogConfig Source # 
Instance details

Defined in System.Logger

Ord LogConfig Source # 
Instance details

Defined in System.Logger

FromJSON (LogConfig -> LogConfig) Source # 
Instance details

Defined in System.Logger

type Rep LogConfig Source # 
Instance details

Defined in System.Logger

type Rep LogConfig = D1 ('MetaData "LogConfig" "System.Logger" "yet-another-logger-0.4.2-Lxa9UVJh9k66tXQMmTt57I" 'False) (C1 ('MetaCons "LogConfig" 'PrefixI 'True) (S1 ('MetaSel ('Just "_logConfigLogger") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 LoggerConfig) :*: S1 ('MetaSel ('Just "_logConfigBackend") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 HandleBackendConfig)))

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