Module: ActiveSupport::LoggerSilence

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

Instance Method Summary collapse

Instance Method Details

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

Silences the logger for the duration of the block.



18
19
20
# File 'lib/activesupport/logger_silence.rb', line 18

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