co-log-sys: Syslog implementation on top of 'co-log-core'

[ library, logging, mpl ] [ Propose Tags ]

Please see the README on GitHub at https://github.com/serokell/co-log-sys#readme


[Skip to Readme]

Modules

[Last Documentation]

  • Colog
    • Colog.Syslog
      • Colog.Syslog.Actions
      • Colog.Syslog.Config
      • Colog.Syslog.Handler
      • Colog.Syslog.Message
      • Colog.Syslog.Priority

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.1.0
Dependencies aeson, base-noprelude (>=4.7 && <5), co-log-core, fmt, loot-prelude, microlens, monad-control, mtl, network, universum, unix [details]
License MPL-2.0
Copyright 2018 Serokell
Author Serokell
Maintainer Serokell <hi@serokell.io>
Category Logging
Home page https://github.com/serokell/co-log-sys#readme
Bug tracker https://github.com/serokell/co-log-sys/issues
Source repo head: git clone https://github.com/serokell/co-log-sys
Uploaded by pasqu4le at 2018-11-20T12:23:24Z
Distributions
Downloads 1153 total (9 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2018-11-20 [all 2 reports]

Readme for co-log-sys-0.1.0.0

[back to package description]

co-log-sys

This is a logging library based on co-log-core that implements a syslog backend.

For more info about how co-log works we advise you to read its presentation blogpost.

NOTE: It's somewhat opinionated in that:

  • it uses the fmt library for formatting
  • uses universum as a Prelude alternative

Example of usage

This is a simple example using the withLogMessageSyslog function:

example :: IO ()
example = withLogMessageSyslog basicSyslogConfig $ \logMessageSyslog -> do
    let logMessageStdout = cmap fmtMessageFlat logTextStdout
        logAction = logMessageSyslog <> logMessageStdout
    unLogAction logAction $ Message Emergency "NOTICE ME HERE"
  where
    basicSyslogConfig = SyslogConfig
        { collector = AutoLocal
        , facility = User
        , appName = "example"
        }

Contributions

If you'd like to contribute or file a Bug Report, please read our Contributors Guide.

License

MPL 2.0

About Serokell

co-log-sys is maintained by Serokell. We love open source software. See which services we provide and drop us a line if you are interested.