Class: Fluent::JsonNestToFlatOutput
- Inherits:
-
Output
- Object
- Output
- Fluent::JsonNestToFlatOutput
- Defined in:
- lib/fluent/plugin/out_json_nest2flat.rb
Instance Method Summary collapse
Instance Method Details
#configure(conf) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/fluent/plugin/out_json_nest2flat.rb', line 9 def configure(conf) super @json_keys = conf['json_keys'] if @json_keys.nil? raise Fluent::ConfigError, "json_keys is undefined!" end @tag = conf['tag'] @json_keys = @json_keys.split(",") end |
#emit(tag, es, chain) ⇒ Object
21 22 23 24 25 26 27 28 29 |
# File 'lib/fluent/plugin/out_json_nest2flat.rb', line 21 def emit(tag, es, chain) es.each { |time, record| chain.next new_record = _convert_record(record); Fluent::Engine.emit(@tag, time, new_record) } end |