Module: ActiveSupport::LoggerSilence

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

Instance Method Summary collapse

Methods included from Concern

append_features, class_methods, extended, included, prepend_features, prepended

Instance Method Details

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

Silences the logger for the duration of the block.



17
18
19
# File 'lib/active_support/logger_silence.rb', line 17

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