Module: Pione::Log::Debug

Defined in:
lib/pione/log/debug.rb

Overview

Debug is a log utility module for showing debug messages. Messages are shown when according debug flags (system, rule_engine, notification, communication, ignored_exception) are available.

Class Method Summary collapse

Class Method Details

.communication(msg_or_exc = nil, pos = caller(1).first, &b) ⇒ Object

Show a debug message abount object communication. This message is visible when +Global.debug_communication+ is true.



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

def self.communication(msg_or_exc=nil, pos=caller(1).first, &b)
  if Global.debug_communication
    print(:communication, msg_or_exc, pos, &b)
  end
end

.ignored_exception(msg_or_exc = nil, pos = caller(1).first, &b) ⇒ Object

Show a ignored exception. This message is visible when +Global.debug_ignored_exception+ is true.



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

def self.ignored_exception(msg_or_exc=nil, pos=caller(1).first, &b)
  if Global.debug_ignored_exception
    print(:ignored_exception, msg_or_exc, pos, &b)
  end
end

.notification(msg_or_exc = nil, pos = caller(1).first, &b) ⇒ Object

Show a debug message about notification. This message is visible when Global.debug_notification is true.



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

def self.notification(msg_or_exc=nil, pos=caller(1).first, &b)
  if Global.debug_notification
    print(:notification, msg_or_exc, pos, &b)
  end
end

.rule_engine(msg_or_exc = nil, pos = caller(1).first, &b) ⇒ Object

Show a debug message about rule engine activity. This message is visible when Global.debug_rule_engine is true in client side.



17
18
19
20
21
# File 'lib/pione/log/debug.rb', line 17

def self.rule_engine(msg_or_exc=nil, pos=caller(1).first, &b)
  if Global.debug_rule_engine
    print(:rule_engine, msg_or_exc, pos, &b)
  end
end

.system(msg_or_exc = nil, pos = caller(1).first, &b) ⇒ Object

Show a debug message about PIONE system activity. This message is visible when Global.debug_system is true.



9
10
11
12
13
# File 'lib/pione/log/debug.rb', line 9

def self.system(msg_or_exc=nil, pos=caller(1).first, &b)
  if Global.debug_system
    print(:system, msg_or_exc, pos, &b)
  end
end