class Catlass::Logger

Public Class Methods

new() click to toggle source
Calls superclass method
# File lib/catlass/logger.rb, line 35
def initialize
  super(STDERR)

  self.formatter = proc do |severity, datetime, progname, msg|
    "#{msg}\n"
  end

  self.level = Logger::INFO
end

Public Instance Methods

debug(progname = nil, method_name = nil, msg) click to toggle source
Calls superclass method
# File lib/catlass/logger.rb, line 45
def debug(progname = nil, method_name = nil, msg)
  super(progname) { { method_name: method_name, message: msg } }
end
error(msg) click to toggle source
Calls superclass method
# File lib/catlass/logger.rb, line 61
def error(msg)
  super { Catlass::TermColor.red(msg) }
end
fatal(msg) click to toggle source
Calls superclass method
# File lib/catlass/logger.rb, line 57
def fatal(msg)
  super { Catlass::TermColor.red(msg) }
end
info(msg) click to toggle source
Calls superclass method
# File lib/catlass/logger.rb, line 49
def info(msg)
  super { Catlass::TermColor.green(msg) }
end
warn(msg) click to toggle source
Calls superclass method
# File lib/catlass/logger.rb, line 53
def warn(msg)
  super { Catlass::TermColor.yellow(msg) }
end