Hi Brad,

I've switched us over from normal file logging to using syslog-logger gem.
 We have syslog-ng that pushes everything up to a master Splunk server, but
then again, we can pay for it, and pay for it we do.  Once of the nice
things about Splunk is that the multi-line issues can be solved by spewing
out the app name and the process id into each log line so you can search it
and recreate the full request, filtering out the other Passenger-spawned
app instances that are running.  So that definitely helps.  I have setup
Graylog as a test run, but since we have Splunk, we never pursued it, but I
imagine it would be the cheap alternative.  You can find puppet or chef
recipes for graylog, I'm sure.

Unfortunately, sending log data out of our datacenter is a huge no-no, so
we can't utilize third-party services for this.

We also prefix our stack dumps from rails with a random/unique error id, so
that makes searching for all parts of the multi-line trace a whole lot
easier once we've identified an error.  This can be configured in
ApplicationController pretty easily.

Here's the gem:
gem 'syslog-logger', '=1.6.8'

Good luck!
- Adam


On Wed, Jul 18, 2012 at 8:04 AM, bradleyland <[email protected]> wrote:

> In our organization, I'm the guy responsible for infrastructure. Most
> aspects of deployment, I've managed to get my hands around, but logging
> still troubles me. Our app is a tool-app that we sell to large businesses
> and municipalities as part of a consulting-heavy product, so our traffic
> levels aren't crazy high 99% of the time. We do, however, have a real-time
> component to our application, which uses polling, so during large events,
> application traffic levels can get up in to areas where I run in to issues
> with request interleaving in the Rails log files.
>
> Rails logging is currently configured with the defaults, so we're using
> the standard BufferedLogger. I really like the multi-line format of the
> standard Rails log, and we've stuffed some additional debugging information
> in to the log, so I'm reluctant to abandon the information we gather. I
> also make use of tools like request-log-analyzer, so that just adds to the
> pain of abandoning file based logging.
>
> I'm wondering what everyone else does for logging in production? I've read
> a few articles on software like Graylog2, but the dependencies really turn
> me off. I'm also considering sticking to something simple, like syslog, but
> syslog & multiline don't go together well. What to do!?
>
> --
> SD Ruby mailing list
> [email protected]
> http://groups.google.com/group/sdruby

-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

Reply via email to