Class: Bunchr::Logger

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

Constant Summary collapse

@@log =
nil

Class Method Summary collapse

Class Method Details

.loggerObject



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

def self.logger()
  if @@log.nil?
    @@log ||= ::Logger.new(STDOUT)
    @@log.level = ENV['BUNCHR_DEBUG'] ? ::Logger::DEBUG : ::Logger::INFO
    # @@log.level = ::Logger::DEBUG
  end
  @@log
end