rudionrails / yell-adapters-syslog

Syslog adapter for Yell
MIT License
3 stars 2 forks source link

Syslog Adapter for Yell - Your Extensible Logging Library

If you are not yet familiar with Yell - Your Extensible Logging Library check out the githup project under https://github.com/rudionrails/yell or jump directly into the Yell wiki at https://github.com/rudionrails/yell/wiki.

Build Status

The Syslog adapter for Yell works and is tested with ruby 1.8.7, 1.9.x, jruby 1.8 and 1.9 mode, rubinius 1.8 and 1.9 as well as ree.

Installation

System wide:

gem install yell-adapters-syslog

Or in your Gemfile:

gem "yell-adapters-syslog"

Usage

logger = Yell.new :syslog

logger.info "Hello World"
# Check your syslog for the received message.

Or alternatively with the block syntax:

logger = Yell.new do |l|
  l.adapter :syslog
end

logger.info 'Hello World!'

You can pass set options and the facility:

logger = Yell.new do |l|
  l.adapter :syslog, :facility => :user, :options => [:pid, :cons]
end

logger.info 'Hello World!'

Copyright © 2012 Rudolf Schmidt, released under the MIT license