Rsyslog

Some Notes Regarding Rsyslog and Remote Logging for Rails Apps

We use SyslogLogger gem in order to forward rails application log to system log.

in rails Gemfile:

group :production do
  gem "SyslogLogger", "~> 2.0", :require => 'syslog/logger'
end

in config/environments/production.rb

config.logger = Syslog::Logger.new "rails_application_name" 

The problem was that logs actually were forwarded to syslog, messages and user.log and sent to remote server and written to syslog, messages and user.log there. I was asked to make things DRY(ier).