Class: DeepTest::Logger

Inherits:
Logger
  • Object
show all
Defined in:
lib/deep_test/logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Logger

Returns a new instance of Logger.



3
4
5
6
7
# File 'lib/deep_test/logger.rb', line 3

def initialize(*args)
  super
  self.formatter = proc { |severity, time, progname, msg| "[DeepTest] #{msg}\n" }
  self.level = configured_log_level
end

Instance Method Details

#configured_log_levelObject



9
10
11
12
13
14
15
# File 'lib/deep_test/logger.rb', line 9

def configured_log_level
  if ENV['DEEP_TEST_LOG_LEVEL']
    Logger.const_get(ENV['DEEP_TEST_LOG_LEVEL'])
  else
    Logger::INFO
  end
end