Popularity
8.7
Stable
Activity
0.0
Stable
2
35
1

Monthly Downloads: 12
Programming language: Haskell
License: MIT License
Tags: System    

logsink alternatives and similar packages

Based on the "System" category.
Alternatively, view logsink alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of logsink or a related project?

Add another 'System' Package

README

logsink

logsink is meant to be used in conjunction with logging-facade. To log messages application code uses functions from System.Logging.Facade. logsink itself is a backend for logging-facade and allows to configure logging behavior.

logsink has built-in support for stderr and syslog. The following example shows how to direct log messages to syslog:

import qualified System.Logging.Facade as Log
import           System.Logging.LogSink.Config

main :: IO ()
main = do
  setupLogging [defaultSinkConfig { sinkConfigTarget = SysLog }]
  Log.error "This is an error message."

You can also configure the message format. (See documentation of System.Logging.LogSink.Format for allowed format directives.)

main2 :: IO ()
main2 = do
  setupLogging [defaultSinkConfig { sinkConfigFormat = "{level} - {timestamp}: {message}" }]
  Log.error "This is an error message."