Monday, August 9, 2010

[Rails] Want my daemons to have their own logger instance

I have a daemon named "sketcher" and I want everything related to the
"sketcher" program to go to "sketcher.log"

I've tried putting
logger = Logger.new(File.join("#{RAILS_ROOT}/log", "sketcher.log")

in the top method of the daemon, but this only succeeds in getting
messages from that same class into my logger. Most of the log
messages from ActiveRecord and other classes end up in
development.log, as usual.

Is there an easy way to redirect all output from each of my daemons
into their own log files?

Thanks -
T

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate