Rails log rotations via rsyslog December 25, 2008Posted by John Dewey in Code, Configuration, Deployment, Example, Rails.
I have a client that logs their rails logs via syslog, for consumption by pl_analyze. I am not a fan of this, and will probably change it at some point. When using Apache, I’ll typically configure rails to use a rotatelogs pipe.
However, in this case, to avoid changing legacy infrastructure around the logs, I setup rsyslog to do the rotations for me. Hopefully this will be useful to someone else.
This assumes your rails app already logs to syslog.
Added the following to /etc/rsyslog.conf.