Safe Haskell | None |
---|---|
Language | Haskell2010 |
This module implements convenience functions for using the Logstash
module with the katip logging framework.
Synopsis
- withLogstashScribe :: (LogstashContext ctx, MonadUnliftIO m) => LogstashQueueCfg ctx -> PermitFunc -> (forall a. LogItem a => Item a -> item) -> (RetryStatus -> item -> ReaderT LogstashConnection IO ()) -> [item -> Handler ()] -> (Scribe -> m r) -> m r
Documentation
:: (LogstashContext ctx, MonadUnliftIO m) | |
=> LogstashQueueCfg ctx | The configuration for the Logstash client. |
-> PermitFunc | A function which determines which entries to include. |
-> (forall a. LogItem a => Item a -> item) | |
-> (RetryStatus -> item -> ReaderT LogstashConnection IO ()) | |
-> [item -> Handler ()] | Exception handlers. |
-> (Scribe -> m r) | A continuation which the |
-> m r |
withLogstashScribe
cfg permitFunc toItem codec handlers cont
is like
withLogstashQueue
except that a Scribe
is passed to cont
instead of
the raw queue. The toItem
function is required to convert Item
values
to whatever input codec
expects. A reasonable default might be toObject
or a wrapper around the LogItem
type class.