module Hutch::Logging

Public Class Methods

logger() click to toggle source
# File lib/hutch/logging.rb, line 20
def self.logger
  @logger || setup_logger
end
logger=(logger) click to toggle source
# File lib/hutch/logging.rb, line 24
def self.logger=(logger)
  @logger = logger
end
setup_logger() click to toggle source
# File lib/hutch/logging.rb, line 12
def self.setup_logger
  require 'hutch/config'
  @logger = Logger.new($stdout).tap do |l|
    l.level = Hutch::Config.log_level
    l.formatter = HutchFormatter.new
  end
end

Public Instance Methods

logger() click to toggle source
# File lib/hutch/logging.rb, line 28
def logger
  Hutch::Logging.logger
end