Module: Roby::Log::PlanHooks

Included in:
Plan
Defined in:
lib/roby/log/hooks.rb

Constant Summary collapse

HOOKS =
%w{inserted_tasks discarded_tasks replaced_tasks 
discovered_tasks discovered_events 
garbage_task finalized_task finalized_event 
added_transaction removed_transaction}

Instance Method Summary collapse

Instance Method Details

#added_transaction(trsc) ⇒ Object



74
75
76
77
# File 'lib/roby/log/hooks.rb', line 74

def added_transaction(trsc)
    super if defined? super
    Roby::Log.log(:added_transaction) { [self, trsc] }
end

#discarded(tasks) ⇒ Object



45
46
47
48
# File 'lib/roby/log/hooks.rb', line 45

def discarded(tasks)
    super if defined? super
    Roby::Log.log(:discarded_tasks) { [self, tasks] }
end

#discovered_events(tasks) ⇒ Object



53
54
55
56
# File 'lib/roby/log/hooks.rb', line 53

def discovered_events(tasks)
    super if defined? super
    Roby::Log.log(:discovered_events) { [self, tasks] }
end

#discovered_tasks(tasks) ⇒ Object



57
58
59
60
# File 'lib/roby/log/hooks.rb', line 57

def discovered_tasks(tasks)
    super if defined? super
    Roby::Log.log(:discovered_tasks) { [self, tasks] }
end

#finalized_event(event) ⇒ Object



65
66
67
68
# File 'lib/roby/log/hooks.rb', line 65

def finalized_event(event)
    super if defined? super
    Roby::Log.log(:finalized_event) { [self, event] }
end

#finalized_task(task) ⇒ Object



69
70
71
72
# File 'lib/roby/log/hooks.rb', line 69

def finalized_task(task)
    super if defined? super
    Roby::Log.log(:finalized_task) { [self, task] }
end

#garbage(task) ⇒ Object



61
62
63
64
# File 'lib/roby/log/hooks.rb', line 61

def garbage(task)
    super if defined? super
    Roby::Log.log(:garbage_task) { [self, task] }
end

#inserted(tasks) ⇒ Object



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

def inserted(tasks)
    super if defined? super
    Roby::Log.log(:inserted_tasks) { [self, tasks] }
end

#removed_transaction(trsc) ⇒ Object



78
79
80
81
# File 'lib/roby/log/hooks.rb', line 78

def removed_transaction(trsc)
    super if defined? super
    Roby::Log.log(:removed_transaction) { [self, trsc] }
end

#replaced(from, to) ⇒ Object



49
50
51
52
# File 'lib/roby/log/hooks.rb', line 49

def replaced(from, to)
    super if defined? super
    Roby::Log.log(:replaced_tasks) { [self, from, to] }
end