Class: Logger

Inherits:
Object show all
Defined in:
lib/active_support/clean_logger.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

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

Silences the logger for the duration of the block.


5
6
7
8
9
10
# File 'lib/active_support/clean_logger.rb', line 5

def silence(temporary_level = Logger::ERROR)
  old_logger_level, self.level = level, temporary_level
  yield
ensure
  self.level = old_logger_level
end