-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Handy logging handler combinators
--
-- Handy logging handler combinators.
@package logging-effect-extra-handler
@version 2.0.0
module Control.Monad.Log.Extra.Handler
-- | Converts an existing handler into a handler that renders an ISO8601
-- (i.e. YYYY-MM-DDTHH:MM:SS) timestamp on every log message.
iso8601Handler :: (MonadIO m, MonadMask m) => Handler m (Doc ann) -> Handler m (Doc ann)
-- | Converts an existing handler into a handler that renders an ISO8601
-- (i.e. YYYY-MM-DDTHH:MM:SS with decimal point and fraction of second)
-- timestamp on every log message.
iso8601PlusHandler :: (MonadIO m, MonadMask m) => Handler m (Doc ann) -> Handler m (Doc ann)
-- | Converts an existing handler into a handler that renders an RFC822
-- timestamp on every log message.
rfc822Handler :: (MonadIO m, MonadMask m) => Handler m (Doc ann) -> Handler m (Doc ann)
-- | Basic dispatch handler that routes Warning, Notice,
-- Informational, and Debug messages to the first input
-- handler and routes Emergency, Alert, Critical,
-- and Error messages to the second input handler.
routeHandler :: (MonadIO m, MonadMask m) => Handler m (Doc ann) -> Handler m (Doc ann) -> (a -> (Doc ann)) -> Handler m (WithSeverity a)
-- | Basic dispatch handler that routes Warning, Notice,
-- Informational, and Debug messages to the first input
-- handler and routes Emergency, Alert, Critical,
-- and Error messages to the second input handler. This function
-- is limiting as it assumes incoming messages are WithSeverity
-- Doc instead of the more general WithSeverity a.
-- | Deprecated: dispatchHandler is deprecated in favor of
-- routeHandler.
dispatchHandler :: (MonadIO m, MonadMask m) => Handler m (Doc ann) -> Handler m (Doc ann) -> Handler m (WithSeverity (Doc ann))
-- | Convenience wrapper around withFDHandler for stdout with
-- somewhat sensible defaults.
withStdoutHandler :: (MonadIO m, MonadMask m) => (Handler m (Doc ann) -> m a) -> m a
-- | Convenience wrapper around withFDHandler for stderr with
-- somewhat sensible defaults.
withStderrHandler :: (MonadIO m, MonadMask m) => (Handler m (Doc ann) -> m a) -> m a
-- | Convenience wrapper around withFDHandler for stdout.
withCustomStdoutHandler :: (MonadIO m, MonadMask m) => BatchingOptions -> Double -> Int -> (Handler m (Doc ann) -> m a) -> m a
-- | Convenience wrapper around withFDHandler for stderr.
withCustomStderrHandler :: (MonadIO m, MonadMask m) => BatchingOptions -> Double -> Int -> (Handler m (Doc ann) -> m a) -> m a
-- | Converts an existing handler into a handler that renders a timestamp
-- on every log message. The timestamp is formatted via the input
-- function.
customTimestampHandler :: (MonadIO m, MonadMask m) => (UTCTime -> String) -> Handler m (Doc ann) -> Handler m (Doc ann)
-- | Convenience wrapper around withFDHandler that enables partially
-- applying the Handle as the first parameter.
withCustomHandler :: (MonadIO m, MonadMask m) => Handle -> BatchingOptions -> Double -> Int -> (Handler m (Doc ann) -> m a) -> m a