Skip to content

fpco/monad-logger-syslog

Repository files navigation

Monad Logger for Syslog

TravisCI Hackage

Install

cabal install monad-logger-syslog

Usage (example)

Default to syslog user facility with name hslogger

import Control.Monad.Logger ( logDebugN  )
import Control.Monad.Logger.Syslog ( runSyslogLoggingT )

main :: IO ()
main = runSyslogLoggingT (logDebugN "HELLO!")

Log under Local1 facility with name mylogger

import Control.Monad.Logger ( logDebugN  )
import Control.Monad.Logger.Syslog ( runCustomSyslogLoggingT )

main :: IO ()
main = runCustomSyslogLoggingT "mylogger" Local1 (logDebugN "HELLO!")