class Codestrap::Log

Logging with pre set error messages

The Log class has been designed to keep track of all possible messages the program will generate

Public Instance Methods

debug(msg, *args) click to toggle source

Log pre set error message

@param [Symbol] msg @param [Array] args

# File lib/codestrap/log.rb, line 52
def debug(msg, *args)
  puts @@msgs[msg].call(*args)
end
error(msg, *args) click to toggle source

Log pre set error message

@param [Symbol] msg @param [Array] args

# File lib/codestrap/log.rb, line 28
def error(msg, *args)
  puts @@msgs[msg].call(*args)
end
fatal(msg, *args) click to toggle source

Log pre set fatal message

@param [Symbol] msg @param [Array] args

# File lib/codestrap/log.rb, line 20
def fatal(msg, *args)
  puts @@msgs[msg].call(*args)
end
info(msg, *args) click to toggle source

Log pre set error message

@param [Symbol] msg @param [Array] args

# File lib/codestrap/log.rb, line 44
def info(msg, *args)
  puts @@msgs[msg].call(*args)
end
warn(msg, *args) click to toggle source

Log pre set error message

@param [Symbol] msg @param [Array] args

# File lib/codestrap/log.rb, line 36
def warn(msg, *args)
  puts @@msgs[msg].call(*args)
end