Friday, February 26, 2010

Log to Console in Rails Console

When you are in the Rails console (./script/console), you might want to see what is being logged through the Rails logger in standard out. To do that, just use:
ActiveRecord::Base.logger = Logger.new(STDOUT)

No comments: