/usr/lib/ruby/vendor_ruby/celluloid/logging/incident.rb is in ruby-celluloid-essentials 0.20.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | module Celluloid
# Wraps all events and context for a single incident.
class Incident
attr_accessor :pid
attr_accessor :events, :triggering_event
def initialize(events, triggering_event=nil)
@events = events
@triggering_event = triggering_event
@pid = $PROCESS_ID
end
# Merge two incidents together. This may be useful if two incidents occur at the same time.
def merge(*other_incidents)
merged_events = other_incidents.flatten.inject(events) do |events, incident|
events += incident.events
end
Incident.new(merged_events.sort, triggering_event)
end
end
end
|