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

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 -> Handler m Doc

-- | 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 -> Handler m Doc

-- | Converts an existing handler into a handler that renders an RFC822
--   timestamp on every log message.
rfc822Handler :: (MonadIO m, MonadMask m) => Handler m Doc -> Handler m Doc

-- | Basic dispatch handler that routes <a>Warning</a>, <a>Notice</a>,
--   <a>Informational</a>, and <a>Debug</a> messages to the first input
--   handler and routes <a>Emergency</a>, <a>Alert</a>, <a>Critical</a>,
--   and <a>Error</a> messages to the second input handler.
routeHandler :: (MonadIO m, MonadMask m) => Handler m Doc -> Handler m Doc -> (a -> Doc) -> Handler m (WithSeverity a)

-- | Basic dispatch handler that routes <a>Warning</a>, <a>Notice</a>,
--   <a>Informational</a>, and <a>Debug</a> messages to the first input
--   handler and routes <a>Emergency</a>, <a>Alert</a>, <a>Critical</a>,
--   and <a>Error</a> messages to the second input handler. This function
--   is limiting as it assumes incoming messages are <a>WithSeverity</a>
--   <a>Doc</a> instead of the more general <a>WithSeverity</a> <tt>a</tt>.

-- | <i>Deprecated: dispatchHandler is deprecated in favor of
--   routeHandler.</i>
dispatchHandler :: (MonadIO m, MonadMask m) => Handler m Doc -> Handler m Doc -> Handler m (WithSeverity Doc)

-- | Convenience wrapper around <a>withFDHandler</a> for <a>stdout</a> with
--   somewhat sensible defaults.
withStdoutHandler :: (MonadIO m, MonadMask m) => (Handler m Doc -> m a) -> m a

-- | Convenience wrapper around <a>withFDHandler</a> for <a>stderr</a> with
--   somewhat sensible defaults.
withStderrHandler :: (MonadIO m, MonadMask m) => (Handler m Doc -> m a) -> m a

-- | Convenience wrapper around <a>withFDHandler</a> for <a>stdout</a>.
withCustomStdoutHandler :: (MonadIO m, MonadMask m) => BatchingOptions -> Float -> Int -> (Handler m Doc -> m a) -> m a

-- | Convenience wrapper around <a>withFDHandler</a> for <a>stderr</a>.
withCustomStderrHandler :: (MonadIO m, MonadMask m) => BatchingOptions -> Float -> Int -> (Handler m Doc -> 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 -> Handler m Doc

-- | Convenience wrapper around <a>withFDHandler</a> that enables partially
--   applying the <a>Handle</a> as the first parameter.
withCustomHandler :: (MonadIO m, MonadMask m) => Handle -> BatchingOptions -> Float -> Int -> (Handler m Doc -> m a) -> m a
