katip-logstash-0.1.0.0: Logstash backend for katip.
Safe HaskellNone
LanguageHaskell2010

Katip.Scribes.Logstash

Description

This module implements convenience functions for using the Logstash module with the katip logging framework.

Synopsis

Documentation

withLogstashScribe Source #

Arguments

:: (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 Scribe is given to.

-> 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.