Class: Fluent::RedeliverOutput
- Inherits:
-
Output
- Object
- Output
- Fluent::RedeliverOutput
- Includes:
- SetTagKeyMixin
- Defined in:
- lib/fluent/plugin/out_redeliver.rb
Instance Method Summary collapse
- #configure(conf) ⇒ Object
- #emit(tag, es, chain) ⇒ Object
-
#initialize ⇒ RedeliverOutput
constructor
A new instance of RedeliverOutput.
- #shutdown ⇒ Object
- #start ⇒ Object
Constructor Details
#initialize ⇒ RedeliverOutput
Returns a new instance of RedeliverOutput.
13 14 15 |
# File 'lib/fluent/plugin/out_redeliver.rb', line 13 def initialize super end |
Instance Method Details
#configure(conf) ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/fluent/plugin/out_redeliver.rb', line 17 def configure(conf) super if tag_attr @include_tag_key = true @tag_key = tag_attr end end |
#emit(tag, es, chain) ⇒ Object
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/fluent/plugin/out_redeliver.rb', line 34 def emit(tag, es, chain) newtag = '' if @regexp and @replace newtag = tag.sub(Regexp.new(@regexp), @replace) end if newtag != tag and newtag.length > 0 es.each do |time, record| if (record) filter_record(tag, time, record) Fluent::Engine.emit(newtag, time, record) end end end chain.next end |
#shutdown ⇒ Object
30 31 32 |
# File 'lib/fluent/plugin/out_redeliver.rb', line 30 def shutdown super end |
#start ⇒ Object
26 27 28 |
# File 'lib/fluent/plugin/out_redeliver.rb', line 26 def start super end |