Created
September 4, 2015 13:19
-
-
Save jwilsjustin/c3e1e84ffffb6715cc44 to your computer and use it in GitHub Desktop.
The best way I've found to log SQL in Rails 4.x+ applications
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Log SQL queries to STDOUT | |
unless Rails.env.test? | |
ActiveRecord::Base.logger = ActiveSupport::Logger.new(STDOUT) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment