Class: Fluent::JsonbucketOutput
- Inherits:
-
Output
- Object
- Output
- Fluent::JsonbucketOutput
- Defined in:
- lib/fluent/plugin/out_jsonbucket.rb
Instance Method Summary collapse
Instance Method Details
#configure(conf) ⇒ Object
7 8 9 10 11 12 |
# File 'lib/fluent/plugin/out_jsonbucket.rb', line 7 def configure(conf) super unless config.has_key?('output_tag') raise Fluent::ConfigError, "you must set 'output_tag'" end end |
#emit(tag, es, chain) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/fluent/plugin/out_jsonbucket.rb', line 14 def emit(tag, es, chain) es.each {|time,record| chain.next bucket = {@json_key => record.to_json} Fluent::Engine.emit(@output_tag, time, bucket) } end |