Module: Ridley::Logging

Overview

Author:

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.loggerLogger


8
9
10
11
12
13
14
# File 'lib/ridley/logging.rb', line 8

def logger
  @logger ||= begin
    log = Logger.new(STDOUT)
    log.level = Logger::WARN
    log
  end
end

.set_logger(obj) ⇒ Logger Also known as: logger=


19
20
21
# File 'lib/ridley/logging.rb', line 19

def set_logger(obj)
  @logger = (obj.nil? ? Logger.new('/dev/null') : obj)
end

Instance Method Details

#loggerLogger Also known as: log


26
27
28
# File 'lib/ridley/logging.rb', line 26

def logger
  Ridley::Logging.logger
end