Steps to get Rails 4 saving its output to Syslog via Rsyslog. This assumes you are on CentOS, but should be pretty adaptable to any other distribution. Ruby 2.0+ is also required.
- Add the gems
logrageandlogstash-eventto yourGemfile. Feel free to remove fromproductionif you'd like to test it indevelopmentas well or something. - Update
production.rbwith thelogragesettings and set theloggertoSyslog::Logger. - Add the
conffiles to/etc/rsyslog.d/./etc/rsyslog.confshould have$IncludeConfig /etc/rsyslog.d/*.confenabled, so it will load any additional configs from/etc/rsyslog.conf.