Rails 4: Show SQL in console in production

Viewed 8877

After upgrading to rails 4 the executed SQL is no longer shown when I execute commands in the rails console on my server in production. How can I enable that again, without hurting the performance?

1 Answers
ActiveRecord::Base.logger = Logger.new(STDOUT)

Execute it in rails console on your server, and then all the ActiveRecord generated SQL queries will be shown.

Related