Safe Haskell | None |
---|---|
Language | Haskell2010 |
Logging.Config.Type
Synopsis
- type Handler = HandlerH Identity
- type Sink = SinkH Identity
- type Config = ConfigH Identity
- newtype ConfigException = ConfigException {}
- data HandlerH f
- = StreamHandler { }
- | FileHandler { }
- | RotatingFileHandler { }
- | TimeRotatingFileHandler { }
- data SinkH f = Sink {}
- data ConfigH f = Config {}
- createManager :: Config -> IO Manager
Documentation
newtype ConfigException Source #
Constructors
ConfigException | |
Instances
Show ConfigException Source # | |
Defined in Logging.Config.Type Methods showsPrec :: Int -> ConfigException -> ShowS # show :: ConfigException -> String # showList :: [ConfigException] -> ShowS # | |
Exception ConfigException Source # | |
Defined in Logging.Config.Type Methods toException :: ConfigException -> SomeException # |
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 | |
FileHandler | |
RotatingFileHandler | |
Fields | |
TimeRotatingFileHandler | Since: 0.7.0 |
Fields
|
Instances
Constructors
Sink | |
Instances
Default SinkH Source # | |
Generic (SinkH f) Source # | |
FromJSON (SinkH Maybe) Source # | |
type Rep (SinkH f) Source # | |
Defined in Logging.Config.Type type Rep (SinkH f) = D1 (MetaData "SinkH" "Logging.Config.Type" "log4hs-0.9.0.0-4PM0R38s3Ze40Yc5B0pDHZ" False) (C1 (MetaCons "Sink" 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 "handlers") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD [String] f)) :*: (S1 (MetaSel (Just "propagate") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD Bool f)) :*: S1 (MetaSel (Just "disabled") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD Bool f)))))) |
Constructors
Config | |
Instances
Default ConfigH Source # | |
Generic (ConfigH f) Source # | |
FromJSON (ConfigH Maybe) Source # | |
type Rep (ConfigH f) Source # | |
Defined in Logging.Config.Type type Rep (ConfigH f) = D1 (MetaData "ConfigH" "Logging.Config.Type" "log4hs-0.9.0.0-4PM0R38s3Ze40Yc5B0pDHZ" False) (C1 (MetaCons "Config" PrefixI True) ((S1 (MetaSel (Just "sinks") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD (MapH String SinkH f) f)) :*: S1 (MetaSel (Just "handlers") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD (MapH String HandlerH f) f))) :*: (S1 (MetaSel (Just "formatters") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD (Map String String) f)) :*: (S1 (MetaSel (Just "timezone") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe String)) :*: S1 (MetaSel (Just "disabled") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HKD Bool f)))))) |
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.