$ script/console
>> ActiveRecord::Base.logger = Logger.new(STDOUT)
=> #
>> User.first
User Load (3.3ms) SELECT * FROM "users" ORDER BY last_name, first_name ASC LIMIT 1
Each call to ActiveRecord now logs all of its activity to STDOUT
(e.g., the console), via your custom logger instance.
1 comment:
Is it possible to automate this? Hate forgetting to do it the before anything else :)
Post a Comment