module DTK::Log

Constants

Config

Public Class Methods

debug(msg, out = $stdout) click to toggle source
# File lib/log.rb, line 30
def self.debug(msg, out = $stdout)
  out << "debug: "
  out << format(msg)
end
debug_pp(obj, out = $stdout) click to toggle source
# File lib/log.rb, line 41
def self.debug_pp(obj, out = $stdout)
  out << Aux::pp_form(obj)
  obj
end
error(msg, out = $stdout) click to toggle source
# File lib/log.rb, line 34
def self.error(msg, out = $stdout)
  out << "error: "
  out << format(msg)
end
info(msg, out = $stdout) click to toggle source
# File lib/log.rb, line 26
def self.info(msg, out = $stdout)
  out << "info: "
  out << format(msg)
end
info_pp(obj, out = $stdout) click to toggle source
# File lib/log.rb, line 38
def self.info_pp(obj, out = $stdout)
  out << Aux::pp_form(obj)
end

Private Class Methods

format(msg) click to toggle source
# File lib/log.rb, line 46
def self.format(msg)
  ret = String.new
  ret << "#{Time.now}: " if Config[:print_time]
  ret << "in fn: #{this_parent_method}: " if Config[:print_method]
  ret << msg
  ret << "\n"
end