G'day folks. In the Rails console, if you configure ActiveRecord's
logger to output to STDOUT, like this:

ActiveRecord::Base.logger = Logger.new STDOUT

how do you switch it back to writing to a file? I tried the 2 lines
below separately, but AR still logs to STDOUT afterwards:

ActiveRecord::Base.logger = Logger.new "#{RAILS_ROOT}/log/#{RAILS_ENV}.log"

ActiveRecord::Base.logger = ActiveSupport::BufferedLogger.new
"#{RAILS_ROOT}/log/#{RAILS_ENV}.log"

Here's a quick summary of what I've found:
http://pastie.org/898868

Any ideas? Thanks,
Nick

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to