Method: Hallmonitor::Dispatcher.output

Defined in:
lib/hallmonitor/dispatcher.rb

.output(event) ⇒ Object

Outputs an event via each registered outputter. If Configuration has the option trap_outputter_exceptions set to true then this method will trap and squash any errors raised by the outputter.

Parameters:

  • event (Event)

    The event to output

Returns:

  • nil



29
30
31
32
33
34
35
36
37
38
# File 'lib/hallmonitor/dispatcher.rb', line 29

def self.output(event)
  @outputters.each do |o|
    begin
      o.process(event)
    rescue
      raise unless Hallmonitor.config && Hallmonitor.config.trap_outputter_exceptions
    end
  end
  nil
end