Class: IsThisUsed::Util::LogSuppressor

Inherits:
Object
  • Object
show all
Defined in:
lib/is_this_used/util/log_suppressor.rb

Class Method Summary collapse

Class Method Details

.suppress_loggingObject



6
7
8
9
10
11
# File 'lib/is_this_used/util/log_suppressor.rb', line 6

def self.suppress_logging
  initial_log_level = ActiveRecord::Base.logger.level
  ActiveRecord::Base.logger.level = :error
  yield
  ActiveRecord::Base.logger.level = initial_log_level
end