class RbPlusPlus::Logger

Helper method for getting access to the logger system Special logger that simply prints out to stdout and stderr Can be configured to ignore certain warning messages.

Public Class Methods

debug(msg) click to toggle source
# File lib/rbplusplus/logger.rb, line 45
def debug(msg)
  $stdout.puts "(DEBUG) #{msg}" if verbose? && !silent?
end
error(msg) click to toggle source
# File lib/rbplusplus/logger.rb, line 49
def error(msg)
  $stderr.puts "(ERROR) #{msg}" if !silent?
end
info(msg) click to toggle source
# File lib/rbplusplus/logger.rb, line 37
def info(msg)
  $stdout.puts "(INFO) #{msg}" if !quiet? && !silent?
end
quiet=(val) click to toggle source

Tell the logger to be a little quieter

# File lib/rbplusplus/logger.rb, line 14
def quiet=(val)
  @@quiet = val
end
quiet?() click to toggle source
# File lib/rbplusplus/logger.rb, line 27
def quiet?
  @@quiet = false unless defined?(@@quiet)
  @@quiet
end
silent!() click to toggle source
# File lib/rbplusplus/logger.rb, line 18
def silent!
  @@silent = true
end
silent?() click to toggle source
# File lib/rbplusplus/logger.rb, line 32
def silent?
  @@silent = false unless defined?(@@silent)
  @@silent
end
verbose=(val) click to toggle source

Tell the logger to print out every message it gets

# File lib/rbplusplus/logger.rb, line 9
def verbose=(val)
  @@verbose = val
end
verbose?() click to toggle source
# File lib/rbplusplus/logger.rb, line 22
def verbose?
  @@verbose = false unless defined?(@@verbose)
  @@verbose
end
warn(type, msg) click to toggle source
# File lib/rbplusplus/logger.rb, line 41
def warn(type, msg)
  $stdout.puts "(WARNING) #{msg}" if !silent?
end