instance method
silence
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
silence()
Silences the logger for the duration of the block.
Source
# File actionpack/lib/action_controller/benchmarking.rb, line 35
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 actionpack/lib/action_controller/benchmarking.rb line 35
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Benchmarking::ClassMethods