log4hs-0.9.0.0: A python logging style log library

Safe HaskellNone
LanguageHaskell2010

Logging.Config.Type

Synopsis

Documentation

data HandlerH f Source #

A datatype used to decode json or yaml into Handler datatypes.

All HKD wrapped and Maybe fields are optional fields, they can be omitted.

There are tow config file templates in Logging.Config.Json and Logging.Config.Yaml.

Note: When decoding from json or yaml, use 'type' field to specify handler type.

Constructors

StreamHandler 

Fields

FileHandler 

Fields

RotatingFileHandler 

Fields

TimeRotatingFileHandler

Since: 0.7.0

Fields

Instances
Default HandlerH Source # 
Instance details

Defined in Logging.Config.Type

Generic (HandlerH f) Source # 
Instance details

Defined in Logging.Config.Type

Associated Types

type Rep (HandlerH f) :: Type -> Type #

Methods

from :: HandlerH f -> Rep (HandlerH f) x #

to :: Rep (HandlerH f) x -> HandlerH f #

FromJSON (HandlerH Maybe) Source # 
Instance details

Defined in Logging.Config.Type

type Rep (HandlerH f) Source # 
Instance details

Defined in Logging.Config.Type

type Rep (HandlerH f) = D1 (MetaData "HandlerH" "Logging.Config.Type" "log4hs-0.9.0.0-4PM0R38s3Ze40Yc5B0pDHZ" False) ((C1 (MetaCons "StreamHandler" PrefixI True) ((S1 (MetaSel (Just "level") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD Level f)) :*: S1 (MetaSel (Just "filterer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD Filterer f))) :*: (S1 (MetaSel (Just "formatter") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD String f)) :*: S1 (MetaSel (Just "stream") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD String f)))) :+: C1 (MetaCons "FileHandler" PrefixI True) ((S1 (MetaSel (Just "level") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD Level f)) :*: S1 (MetaSel (Just "filterer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD Filterer f))) :*: (S1 (MetaSel (Just "formatter") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD String f)) :*: (S1 (MetaSel (Just "file") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath) :*: S1 (MetaSel (Just "encoding") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD String f)))))) :+: (C1 (MetaCons "RotatingFileHandler" PrefixI True) ((S1 (MetaSel (Just "level") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD Level f)) :*: (S1 (MetaSel (Just "filterer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD Filterer f)) :*: S1 (MetaSel (Just "formatter") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD String f)))) :*: ((S1 (MetaSel (Just "file") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath) :*: S1 (MetaSel (Just "encoding") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD String f))) :*: (S1 (MetaSel (Just "maxBytes") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD Int f)) :*: S1 (MetaSel (Just "backupCount") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD Int f))))) :+: C1 (MetaCons "TimeRotatingFileHandler" PrefixI True) (((S1 (MetaSel (Just "level") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD Level f)) :*: S1 (MetaSel (Just "filterer") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD Filterer f))) :*: (S1 (MetaSel (Just "formatter") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD String f)) :*: S1 (MetaSel (Just "file") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath))) :*: ((S1 (MetaSel (Just "encoding") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD String f)) :*: S1 (MetaSel (Just "timezone") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String))) :*: (S1 (MetaSel (Just "rotateTime") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD RotateTime f)) :*: S1 (MetaSel (Just "backupCount") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD Int f)))))))

data SinkH f Source #

Constructors

Sink 

Fields

Instances
Default SinkH Source # 
Instance details

Defined in Logging.Config.Type

Generic (SinkH f) Source # 
Instance details

Defined in Logging.Config.Type

Associated Types

type Rep (SinkH f) :: Type -> Type #

Methods

from :: SinkH f -> Rep (SinkH f) x #

to :: Rep (SinkH f) x -> SinkH f #

FromJSON (SinkH Maybe) Source # 
Instance details

Defined in Logging.Config.Type

type Rep (SinkH f) Source # 
Instance details

Defined in Logging.Config.Type

data ConfigH f Source #

Constructors

Config 

Fields

Instances
Default ConfigH Source # 
Instance details

Defined in Logging.Config.Type

Generic (ConfigH f) Source # 
Instance details

Defined in Logging.Config.Type

Associated Types

type Rep (ConfigH f) :: Type -> Type #

Methods

from :: ConfigH f -> Rep (ConfigH f) x #

to :: Rep (ConfigH f) x -> ConfigH f #

FromJSON (ConfigH Maybe) Source # 
Instance details

Defined in Logging.Config.Type

type Rep (ConfigH f) Source # 
Instance details

Defined in Logging.Config.Type

createManager :: Config -> IO Manager Source #

Create Logging.Manager.Manager from ConfigH.

This function is only used by Logging.Config.Json and Logging.Config.Yaml, use functions provided in these two modules directly.