instance method
silence
Ruby on Rails 3.1.12
Since v3.0.20 Last seen in v4.0.13Signature
silence()
Silence the logger during the execution of the block.
Source
# File activesupport/lib/active_support/benchmarkable.rb, line 53
def silence
old_logger_level, logger.level = logger.level, ::Logger::ERROR if logger
yield
ensure
logger.level = old_logger_level if logger
end
Defined in activesupport/lib/active_support/benchmarkable.rb line 53
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::Benchmarkable