module Colog.Syslog.Actions
(
withLogMessageSyslog
, withLogMessageSyslogGeneric
) where
import Universum
import Colog.Core.Action (LogAction (..))
import Colog.Syslog.Config
import Colog.Syslog.Handler
import Colog.Syslog.Message
import Control.Monad.Trans.Control (MonadBaseControl)
withLogMessageSyslog :: MonadIO m => SyslogConfig -> (LogAction m Message -> IO r) -> IO r
withLogMessageSyslog config action = withSyslog config $ action . logSyslogMessage
withLogMessageSyslogGeneric
:: (MonadBaseControl IO n, MonadIO m)
=> SyslogConfig
-> (LogAction m Message -> n r) -> n r
withLogMessageSyslogGeneric config action = withSyslogGeneric config $
action . logSyslogMessage