Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Dead simple Ruby Syslog logger
branch: master

Merge pull request #28 from rootedbox/roll_version

roll the version number for new formatter functionality
latest commit 075e15d871
Cyril Rohr authored

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.

Build Status

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)

# Optionally split messages to the specified number of bytes
logger.max_octets = 480

# 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 development dependencies:

    $ gem install bundler
    $ bundle install
  • Run tests:

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

    $ gem build syslogger.gemspec

Changelog

See <github.com/crohr/syslogger/commits/master>.

Contributions

See <github.com/crohr/syslogger/contributors>.

Copyright

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

Something went wrong with that request. Please try again.