Module: DTK::Log

Defined in:
lib/log.rb

Constant Summary collapse

Config =
Hash.new

Class Method Summary collapse

Class Method Details

.debug(msg, out = $stdout) ⇒ Object



30
31
32
33
# File 'lib/log.rb', line 30

def self.debug(msg, out = $stdout)
  out << "debug: "
  out << format(msg)
end

.debug_pp(obj, out = $stdout) ⇒ Object



41
42
43
44
# File 'lib/log.rb', line 41

def self.debug_pp(obj, out = $stdout)
  out << Aux::pp_form(obj)
  obj
end

.error(msg, out = $stdout) ⇒ Object



34
35
36
37
# File 'lib/log.rb', line 34

def self.error(msg, out = $stdout)
  out << "error: "
  out << format(msg)
end

.info(msg, out = $stdout) ⇒ Object



26
27
28
29
# File 'lib/log.rb', line 26

def self.info(msg, out = $stdout)
  out << "info: "
  out << format(msg)
end

.info_pp(obj, out = $stdout) ⇒ Object



38
39
40
# File 'lib/log.rb', line 38

def self.info_pp(obj, out = $stdout)
  out << Aux::pp_form(obj)
end