Module: ActiveSupport::LoggerSilence

Extended by:
Concern
Included in:
Logger
Defined in:
activesupport/lib/active_support/logger_silence.rb

Instance Method Summary collapse

Methods included from Concern

append_features, class_methods, extended, included

Instance Method Details

#silence(severity = Logger::ERROR) ⇒ Object

Silences the logger for the duration of the block.



30
31
32
# File 'activesupport/lib/active_support/logger_silence.rb', line 30

def silence(severity = Logger::ERROR)
  silencer ? log_at(severity) { yield self } : yield(self)
end