Module: Koch::LogHelper

Defined in:
lib/koch/log_helper.rb

Overview

LogHelper provides simple logging for the whole program

Constant Summary collapse

@@logger =
Logger.new($stdout)

Instance Method Summary collapse

Instance Method Details

#debug(*args) ⇒ Object



19
20
21
# File 'lib/koch/log_helper.rb', line 19

def debug(*args)
  @@logger.debug(*args)
end

#error(*args) ⇒ Object



31
32
33
# File 'lib/koch/log_helper.rb', line 31

def error(*args)
  @@logger.error(*args)
end

#fatal(*args) ⇒ Object



35
36
37
38
# File 'lib/koch/log_helper.rb', line 35

def fatal(*args)
  @@logger.fatal(*args)
  exit 1
end

#info(*args) ⇒ Object



23
24
25
# File 'lib/koch/log_helper.rb', line 23

def info(*args)
  @@logger.info(*args)
end

#loggerObject



15
16
17
# File 'lib/koch/log_helper.rb', line 15

def logger
  @@logger
end

#warn(*args) ⇒ Object



27
28
29
# File 'lib/koch/log_helper.rb', line 27

def warn(*args)
  @@logger.warn(*args)
end