Class: Envoku::Logger

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

Instance Method Summary collapse

Constructor Details

#initialize(*args) ⇒ Logger


16
17
18
19
20
21
# File 'lib/envoku/logger.rb', line 16

def initialize(*args)
  super
  @progname = "envoku"
  log_level = (ENV["ENVOKU_LOG_LEVEL"] || ENV["LOG_LEVEL"] || "").upcase
  @level = ["DEBUG", "INFO", "WARN", "ERROR", "FATAL", "UNKNOWN"].index(log_level) != nil ? Logger.const_get(log_level) : Logger::INFO
end