Class: Optimizely::SimpleLogger

Inherits:
BaseLogger show all
Defined in:
lib/optimizely/logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(min_level = Logger::INFO) ⇒ SimpleLogger

Simple wrapper around Logger.



36
37
38
39
40
# File 'lib/optimizely/logger.rb', line 36

def initialize(min_level = Logger::INFO)
  super()
  @logger = Logger.new($stdout)
  @logger.level = min_level
end

Instance Method Details

#log(level, message) ⇒ Object



42
43
44
# File 'lib/optimizely/logger.rb', line 42

def log(level, message)
  @logger.add(level, message)
end