class Macinbox::Logger

Constants

PREFIXES

Public Class Methods

error(msg) click to toggle source
# File lib/macinbox/logger.rb, line 21
def self.error(msg)
  STDERR.puts TTY::Color::RED + prefix + msg + TTY::Color::RESET
end
info(msg) { || ... } click to toggle source
# File lib/macinbox/logger.rb, line 13
def self.info(msg)
  STDERR.puts TTY::Color::GREEN + prefix + msg + TTY::Color::RESET
  if block_given?
    @@depth += 1
    yield
    @@depth -= 1
  end
end
prefix() click to toggle source
# File lib/macinbox/logger.rb, line 7
def self.prefix
  PREFIXES[@@depth]
end
reset_depth() click to toggle source
# File lib/macinbox/logger.rb, line 10
def self.reset_depth
  @@depth = 0
end