Reputation: 17174
I'd like to have all my ActiveRecord SQL logging to have redirected in a different file. It's kinda messy to have it on the console or in the log/development.log.
How to do that? I'd love to have it in a log/development_sql.log file.
Thanks
Upvotes: 7
Views: 1158
Reputation: 24617
You can set it in config/application.rb
:
config.active_record.logger = Logger.new("log/development_sql.log")
Upvotes: 7