Last active
August 29, 2015 14:19
-
-
Save coalwater/40b061b2d0adcc8b3c9d to your computer and use it in GitHub Desktop.
Active Record logger examples
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
ActiveRecord::Base.logger.level = :debug | |
ActiveRecord::Base.logger.level = :info | |
ActiveRecord::Base.logger.level = :warn | |
ActiveRecord::Base.logger.level = :error | |
ActiveRecord::Base.logger.level = :fatal | |
ActiveRecord::Base.logger.level = :unknown |
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
ActiveRecord::Base.logger.silence do | |
# do a lot of querys without noisy logs | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment