Created
November 2, 2017 15:20
-
-
Save binarylogic/b876108b00505ccdcc813db2dd8623e7 to your computer and use it in GitHub Desktop.
Adjusting level temporarily
This file contains hidden or 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
Rails.logger.level = :info | |
Rails.logger.silence(Logger::ERROR) do | |
Rails.logger.info("info message") # will _not_ be logged | |
Rails.logger.error("error mesasge") # _will_ be logged | |
end | |
Rails.logger.info("info message") # _will_ be logged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment