log-effect-syslog: Syslog functions for log-effect

[ bsd3, control, effect, library, logging, syslog ] [ Propose Tags ]

Utility functions for combining log-effect and syslog

[Skip to Readme]
Versions [faq] 0.1.0
Dependencies base (>=4.9 && <5.0), bytestring (>=0.10), extensible-effects (>=, hsyslog (==5.*), log-effect (>=1.0.0), monad-control (>=1.0), transformers-base [details]
License BSD-3-Clause
Author Lana Black
Maintainer lanablack@amok.cc
Category Control, Effect, Logging, Syslog
Home page https://github.com/greydot/log-effect-syslog
Source repo head: git clone https://github.com/greydot/log-effect-syslog
Uploaded by sickmind at Thu May 10 16:39:07 UTC 2018
Distributions NixOS:0.1.0
Downloads 131 total (16 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2018-05-10 [all 1 reports]




Maintainer's Corner

For package maintainers and hackage trustees

Readme for log-effect-syslog-0.1.0

[back to package description]


This package contains a set of utility functions that provide ability to log to syslog using (extensible-effects)[https://hackage.haskell.org/package/extensible-effects] and (log-effect)[https://hackage.haskell.org/package/log-effect].


import Control.Eff
import Control.Eff.Lift
import Control.Eff.Log
import Control.Eff.Log.Syslog

someComp :: ( [LogM IO SyslogMsg] <:: r
            , Lifted IO r
            ) => Eff r ()
someComp = do logInfo "Doing something"
              logDebug "Doing something else"
              {- ... -}
              logInfo "Ok, we're done"

main :: IO ()
main = runLift $ runSyslog "MyProgram" [LogPID] User
               $ someComp