Class: Fluent::Plugin::CopyOutput

Inherits:
MultiOutput
  • Object
show all
Defined in:
lib/fluent/plugin/out_copy.rb

Instance Method Summary collapse

Instance Method Details

#multi_workers_ready?Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/fluent/plugin/out_copy.rb', line 28

def multi_workers_ready?
  true
end

#process(tag, es) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
44
# File 'lib/fluent/plugin/out_copy.rb', line 32

def process(tag, es)
  unless es.repeatable?
    m = Fluent::MultiEventStream.new
    es.each {|time,record|
      m.add(time, record)
    }
    es = m
  end

  outputs.each do |output|
    output.emit_events(tag, @deep_copy ? es.dup : es)
  end
end