BufferedSyslogger

A drop-in replacement for the Rails 3 default BufferedLogger library, that logs to syslog instead of a log file. Builds on the syslogger gem.

Installation

Put this into your Gemfile:

gem 'buffered_syslogger'

Usage

Somewhere in you application initialization (e.g. production.rb)

will send all messages to the local0 facility, adding the process id in the message

config.logger = BufferedSyslogger.new("app_name", Syslog::LOG_PID, Syslog::LOG_LOCAL0)

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

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

Copyright (c) 2010 László Bácsi, Secret Sauce Partners, Inc.

Copyright (c) 2010 Cyril, INRIA Rennes-Bretagne Atlantique.

See LICENSE for details.