yet-another-logger-0.3.0: Yet Another Logger

CopyrightCopyright (c) 2014-2015 PivotCloud Inc.
LicenseApache License, Version 2.0
MaintainerLars Kuhtz <lkuhtz@pivotmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

System.Logger.Backend.Handle

Contents

Description

 

Synopsis

Handle Configuration

data LoggerHandleConfig Source #

Instances

Eq LoggerHandleConfig Source # 
Ord LoggerHandleConfig Source # 
Read LoggerHandleConfig Source # 
Show LoggerHandleConfig Source # 
Generic LoggerHandleConfig Source # 
ToJSON LoggerHandleConfig Source # 
FromJSON LoggerHandleConfig Source # 
NFData LoggerHandleConfig Source # 

Methods

rnf :: LoggerHandleConfig -> () #

type Rep LoggerHandleConfig Source # 
type Rep LoggerHandleConfig = D1 (MetaData "LoggerHandleConfig" "System.Logger.Backend.Handle" "yet-another-logger-0.3.0-5rm0jRQNZUUFOUSMQAcGn3" False) ((:+:) (C1 (MetaCons "StdOut" PrefixI False) U1) ((:+:) (C1 (MetaCons "StdErr" PrefixI False) U1) (C1 (MetaCons "FileHandle" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath)))))

pLoggerHandleConfig_ Source #

Arguments

:: Text

prefix for the command line options.

-> Parser LoggerHandleConfig 

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

Since: 0.2

Backend Configuration

data HandleBackendConfig Source #

HandleBackendConfig

Instances

Eq HandleBackendConfig Source # 
Ord HandleBackendConfig Source # 
Read HandleBackendConfig Source # 
Show HandleBackendConfig Source # 
Generic HandleBackendConfig Source # 
ToJSON HandleBackendConfig Source # 
NFData HandleBackendConfig Source # 

Methods

rnf :: HandleBackendConfig -> () #

FromJSON (HandleBackendConfig -> HandleBackendConfig) Source # 
type Rep HandleBackendConfig Source # 
type Rep HandleBackendConfig = D1 (MetaData "HandleBackendConfig" "System.Logger.Backend.Handle" "yet-another-logger-0.3.0-5rm0jRQNZUUFOUSMQAcGn3" False) (C1 (MetaCons "HandleBackendConfig" PrefixI True) ((:*:) (S1 (MetaSel (Just Symbol "_handleBackendConfigColor") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ColorOption)) (S1 (MetaSel (Just Symbol "_handleBackendConfigHandle") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 LoggerHandleConfig))))

pHandleBackendConfig_ Source #

Arguments

:: Text

prefix for this and all subordinate command line options.

-> MParser HandleBackendConfig 

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

Since: 0.2

Backend Implementation

withHandleBackend_ Source #

Arguments

:: (MonadIO m, MonadBaseControl IO m) 
=> (msg -> Text)

formatting function for the log message

-> HandleBackendConfig 
-> (LoggerBackend msg -> m α) 
-> m α 

A version of withHandleBackend that is generic in the type of the log message.

Since: 0.2.2

handleBackend Source #

Arguments

:: Handle 
-> Bool

whether to use ANSI color escape codes

-> LoggerBackend Text 

handleBackend_ Source #

Arguments

:: (msg -> Text)

formatting function for the log message

-> Handle 
-> Bool

whether to use ANSI color escape codes

-> LoggerBackend msg 

A version of handleBackend that is generic in the type of the log message.

Since: 0.2.2