Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Dead simple Ruby Syslog logger

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .document
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.rdoc
Octocat-spinner-32 Rakefile
Octocat-spinner-32 syslogger.gemspec
README.rdoc

syslogger

A drop-in replacement for the standard Logger Ruby library, that logs to the syslog instead of a log file. Contrary to the SyslogLogger library, you can specify the facility and the syslog options.

Installation

$ gem install syslogger

Usage

require 'syslogger'

# Will send all messages to the local0 facility, adding the process id in the message
logger = Syslogger.new("app_name", Syslog::LOG_PID, Syslog::LOG_LOCAL0)

# Send messages that are at least of the Logger::INFO level
logger.level = Logger::INFO # use Logger levels

logger.debug "will not appear"
logger.info "will appear"
logger.warn "will appear"

Documentation available at <rdoc.info/github/crohr/syslogger/master/file/README.rdoc>.

Development

  • Install bundler:

    $ gem install bundler
  • Install development dependencies:

    $ bundle install
  • Run tests:

    $ bundle exec rake
  • Package (do not forget to increment Syslogger:VERSION):

    $ gem build syslogger.gemspec

Contributions

  • crhym3

  • theflow

  • smulube

  • levent

Copyright

Copyright © 2010 Cyril, INRIA Rennes-Bretagne Atlantique. See LICENSE for details.

Something went wrong with that request. Please try again.