Module: Panoptimon::Logger

Included in:
Collector, HTTP, Monitor
Defined in:
lib/panoptimon/logger.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.loggerObject



11
12
13
14
15
16
17
# File 'lib/panoptimon/logger.rb', line 11

def self.logger
  @logger ||= Logger.new($stderr).tap {|l|
    env_l = ENV.delete('LOG_LEVEL')
    l.level = env_l.nil? ?
      Logger::WARN : Logger.const_get(env_l.upcase)
  }
end

Instance Method Details

#loggerObject



7
8
9
# File 'lib/panoptimon/logger.rb', line 7

def logger
  Panoptimon::Logger.logger
end