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

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain]

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


[Skip to ReadMe]

Properties

Versions0.1.0.0, 0.1.1.0, 0.1.1.0
Change logNone available
Dependenciesaeson, base (>=4.7 && <5), co-log-core, fmt, microlens, monad-control, mtl, network, universum, unix [details]
LicenseMPL-2.0
Copyright2018 Serokell
AuthorSerokell
MaintainerSerokell <hi@serokell.io>
CategoryLogging
Home pagehttps://github.com/serokell/co-log-sys#readme
Bug trackerhttps://github.com/serokell/co-log-sys/issues
Source repositoryhead: git clone https://github.com/serokell/co-log-sys
UploadedWed Nov 21 18:09:57 UTC 2018 by pasqu4le

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees


Readme for co-log-sys-0.1.1.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:

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 and funded with :heart: by Serokell. The names and logo for Serokell are trademark of Serokell OÜ.

We love open source software! See our other projects or hire us to design, develop and grow your idea!