syslogger
syslogger
Syslogger - A Log::Backend that writes to syslog.
Installation
-
Add the dependency to your
shard.yml
:dependencies: syslogger: version: 0.1.0 github: lazau/syslogger
-
Run
shards install
Usage
require "log"
require "syslogger"
Log.setup_from_env(backend: Log::SyslogBackend.new)
Thread Safety
Syslog is a process wide resource in Linux and FreeBSD see man syslog(3)
.
OpenBSD allows reentrant syslogging, but Log::SyslogBackend doesn't currently support it.
As of version 0.1.0, only a single Log::SyslogBackend is supported per process. Multiple instantiations
result in undefined behavior. Writting to the SyslogBackend from different fibers result in undefined behavior.
Contributing
- Fork it (https://github.com/lazau/syslogger/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors & Acknowledgements
- Laza Upatising - creator and maintainer
- Chris Huxtable - author of syslog.cr, where major pieces of code originates (lib_c, enums).