I was wondering if there are any truly unified logging systems out there that can support Rails and delayed jobs, and are relatively easy to set up.
I want to be able to log to the same server/file for any execution context in my application (Rails, delayed jobs, etc), even if i'm not currently in a Rails context.
Love the Rails logger, but I can't log to it while in a Resque job. Any ideas?
Do you mean a file-logger, similar to syslog?
Ruby's got both Logger
and Syslog
.
Logger can do log rolling, handles severity levels, and is used in a lot of Ruby modules for logging. You can define the name of the file to log to, or use STDOUT/STDERR or an IO stream.
The docs for syslog are pretty barebones, but you can get info by browsing its source code, or reading the Ruby Syslog README.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With