Disable Rails SQL logging in console

The Solution to Disable Rails SQL logging in console is


To turn it off:

old_logger = ActiveRecord::Base.logger
ActiveRecord::Base.logger = nil

To turn it back on:

ActiveRecord::Base.logger = old_logger

~ Answered on 2011-10-13 20:37:11


Most Viewed Questions: