logger-0.1.0.0: Fast & extensible logging framework

Copyright(C) 2015 Flowbox
LicenseApache-2.0
MaintainerWojciech Daniło <wojciech.danilo@gmail.com>
Stabilitystable
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

System.Log.Logger.Handler

Description

 

Documentation

class MonadLoggerHandler n m | m -> n where Source

Minimal complete definition

Nothing

Methods

addHandler :: Handler n (LogFormat m) -> m () Source

data Handler m l Source

Constructors

Handler 

Fields

_name :: String
 
_action :: Doc -> Log l -> m ()
 
_children :: [Handler m l]
 
_formatter :: Maybe (Formatter l)
 
_filters :: [Filter l]
 

Instances

Show (Handler m l) 

name :: forall m l. Lens' (Handler m l) String Source

formatter :: forall m l. Lens' (Handler m l) (Maybe (Formatter l)) Source

filters :: forall m l. Lens' (Handler m l) [Filter l] Source

children :: forall m l. Lens' (Handler m l) [Handler m l] Source

action :: forall m l. Lens' (Handler m l) (Doc -> Log l -> m ()) Source

mkHandler :: String -> (Doc -> Log l -> m ()) -> Maybe (Formatter l) -> Handler m l Source

runHandler :: (Applicative m, Monad m) => Doc -> Log (LogFormat m) -> Handler' m -> m () Source