Class: Fluent::ColorStripperOutput
- Inherits:
-
Output
- Object
- Output
- Fluent::ColorStripperOutput
- Defined in:
- lib/fluent/plugin/out_color_stripper.rb
Instance Method Summary collapse
Instance Method Details
#configure(conf) ⇒ Object
8 9 10 11 12 13 14 15 16 |
# File 'lib/fluent/plugin/out_color_stripper.rb', line 8 def configure(conf) super @tag = conf.fetch('tag') { raise ArgumentError, 'tag field is required to direct transformed logs to' } @strip_fields_arr = conf['strip_fields'].to_s.split(/\s*,\s*/).map do |field| field unless field.strip.empty? end.compact end |
#emit(tag, es, chain) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/fluent/plugin/out_color_stripper.rb', line 18 def emit(tag, es, chain) es.each do |time, record| Engine.emit(@tag, time, format_record(record)) end chain.next end |