Class: Fluent::FlattenHashOutput
- Inherits:
-
Output
- Object
- Output
- Fluent::FlattenHashOutput
- Includes:
- FlattenHashUtil, HandleTagNameMixin
- Defined in:
- lib/fluent/plugin/out_flatten_hash.rb
Instance Method Summary collapse
- #configure(conf) ⇒ Object
- #emit(tag, es, chain) ⇒ Object
-
#initialize ⇒ FlattenHashOutput
constructor
A new instance of FlattenHashOutput.
Methods included from FlattenHashUtil
Constructor Details
#initialize ⇒ FlattenHashOutput
Returns a new instance of FlattenHashOutput.
12 13 14 |
# File 'lib/fluent/plugin/out_flatten_hash.rb', line 12 def initialize super end |
Instance Method Details
#configure(conf) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/fluent/plugin/out_flatten_hash.rb', line 16 def configure(conf) super if (!@tag && !remove_tag_prefix && !remove_tag_suffix && !add_tag_prefix && !add_tag_suffix ) raise ConfigError, "out_flatten_hash: No tag parameters are set" end end |
#emit(tag, es, chain) ⇒ Object
27 28 29 30 31 32 33 34 35 36 |
# File 'lib/fluent/plugin/out_flatten_hash.rb', line 27 def emit(tag, es, chain) tag = @tag || tag es.each do |time, record| record = flatten_record(record, []) t = tag.dup filter_record(t, time, record) router.emit(t, time, record) end chain.next end |