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

data LogConfig Source #

Instances

Eq LogConfig Source # 
Ord LogConfig Source # 
Read LogConfig Source # 
Show LogConfig Source # 
Generic LogConfig Source # 

Associated Types

type Rep LogConfig :: * -> * #

ToJSON LogConfig Source # 
FromJSON (LogConfig -> LogConfig) Source # 
type Rep LogConfig Source # 
type Rep LogConfig = D1 (MetaData "LogConfig" "System.Logger" "yet-another-logger-0.3.0-5rm0jRQNZUUFOUSMQAcGn3" False) (C1 (MetaCons "LogConfig" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_logConfigLogger") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 LoggerConfig)) (S1 (MetaSel (Just Symbol "_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