# File lib/fluent/plugin/out_copy.rb, line 28 def initialize super @outputs = [] end
# File lib/fluent/plugin/out_copy.rb, line 35 def configure(conf) super conf.elements.select {|e| e.name == 'store' }.each {|e| type = e['@type'] || e['type'] unless type raise ConfigError, "Missing 'type' parameter on <store> directive" end log.debug "adding store type=#{type.dump}" output = Plugin.new_output(type) output.router = router output.configure(e) @outputs << output } end
# File lib/fluent/plugin/out_copy.rb, line 65 def emit(tag, es, chain) unless es.repeatable? m = MultiEventStream.new es.each {|time,record| m.add(time, record) } es = m end if @deep_copy chain = CopyOutputChain.new(@outputs, tag, es, chain) else chain = OutputChain.new(@outputs, tag, es, chain) end chain.next end
# File lib/fluent/plugin/out_copy.rb, line 59 def shutdown @outputs.each {|o| o.shutdown } end
# File lib/fluent/plugin/out_copy.rb, line 53 def start @outputs.each {|o| o.start } end