Skip to content

hyfather/syslogger

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

This fork takes care of log messages spanning across multiple lines. Like in a Rails backtrace.

$ gem install syslogger
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>.

  • 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
  • crhym3

  • theflow

  • smulube

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

About

Dead simple Ruby Syslog logger

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%