Class: Para::LogConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/para/log_config.rb

Class Method Summary collapse

Class Method Details

.with_log_level(level, &block) ⇒ Object



3
4
5
6
7
8
9
10
11
12
# File 'lib/para/log_config.rb', line 3

def self.with_log_level(level, &block)
  begin
    log_level = Rails.logger.level
    Rails.logger.level = :fatal

    block.call
  ensure
    Rails.logger.level = log_level
  end
end