0.0
No commit activity in last 3 years
No release in over 3 years
Same as SyslogLogger, but without the ridiculous number of dependencies and with the possibility to specify the syslog facility - forked and gemified for sayso
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 0.8
~> 1.3
 Project Readme

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)

# Log all messages with given prefix. Might be combined with middleware to
# have request information in each log message.
# See https://gist.github.com/892489 for middleware example.
logger.prefix = '[PREFIX]'

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

# Logs all messages with given prefix, useful to have e.g. request ip
# See https://gist.github.com/892489 for middleware example
logger.prefix = 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

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