yet-another-logger-0.3.1: Yet Another Logger

CopyrightCopyright (c) 2016-2018 Lars Kuhtz <lakuhtz@gmail.com>
Copyright (c) 2014-2015 PivotCloud Inc.
LicenseApache License, Version 2.0
MaintainerLars Kuhtz <lakuhtz@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

System.Logger.Backend.Handle

Contents

Description

 
Synopsis

Handle Configuration

data LoggerHandleConfig Source #

Instances
Eq LoggerHandleConfig Source # 
Instance details

Defined in System.Logger.Backend.Handle

Ord LoggerHandleConfig Source # 
Instance details

Defined in System.Logger.Backend.Handle

Read LoggerHandleConfig Source # 
Instance details

Defined in System.Logger.Backend.Handle

Show LoggerHandleConfig Source # 
Instance details

Defined in System.Logger.Backend.Handle

Generic LoggerHandleConfig Source # 
Instance details

Defined in System.Logger.Backend.Handle

Associated Types

type Rep LoggerHandleConfig :: * -> * #

NFData LoggerHandleConfig Source # 
Instance details

Defined in System.Logger.Backend.Handle

Methods

rnf :: LoggerHandleConfig -> () #

ToJSON LoggerHandleConfig Source # 
Instance details

Defined in System.Logger.Backend.Handle

FromJSON LoggerHandleConfig Source # 
Instance details

Defined in System.Logger.Backend.Handle

type Rep LoggerHandleConfig Source # 
Instance details

Defined in System.Logger.Backend.Handle

type Rep LoggerHandleConfig = D1 (MetaData "LoggerHandleConfig" "System.Logger.Backend.Handle" "yet-another-logger-0.3.1-9xkv1iYSnq3IJ3TK3FoqRe" False) (C1 (MetaCons "StdOut" PrefixI False) (U1 :: * -> *) :+: (C1 (MetaCons "StdErr" PrefixI False) (U1 :: * -> *) :+: C1 (MetaCons "FileHandle" PrefixI False) (S1 (MetaSel (Nothing :: Maybe 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: yet-another-logger-0.2

Backend Configuration

data HandleBackendConfig Source #

HandleBackendConfig

Instances
Eq HandleBackendConfig Source # 
Instance details

Defined in System.Logger.Backend.Handle

Ord HandleBackendConfig Source # 
Instance details

Defined in System.Logger.Backend.Handle

Read HandleBackendConfig Source # 
Instance details

Defined in System.Logger.Backend.Handle

Show HandleBackendConfig Source # 
Instance details

Defined in System.Logger.Backend.Handle

Generic HandleBackendConfig Source # 
Instance details

Defined in System.Logger.Backend.Handle

Associated Types

type Rep HandleBackendConfig :: * -> * #

NFData HandleBackendConfig Source # 
Instance details

Defined in System.Logger.Backend.Handle

Methods

rnf :: HandleBackendConfig -> () #

ToJSON HandleBackendConfig Source # 
Instance details

Defined in System.Logger.Backend.Handle

FromJSON (HandleBackendConfig -> HandleBackendConfig) Source # 
Instance details

Defined in System.Logger.Backend.Handle

type Rep HandleBackendConfig Source # 
Instance details

Defined in System.Logger.Backend.Handle

type Rep HandleBackendConfig = D1 (MetaData "HandleBackendConfig" "System.Logger.Backend.Handle" "yet-another-logger-0.3.1-9xkv1iYSnq3IJ3TK3FoqRe" False) (C1 (MetaCons "HandleBackendConfig" PrefixI True) (S1 (MetaSel (Just "_handleBackendConfigColor") NoSourceUnpackedness SourceStrict DecidedStrict) (Rec0 ColorOption) :*: S1 (MetaSel (Just "_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: yet-another-logger-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: yet-another-logger-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: yet-another-logger-0.2.2