Class: LogStash::Filters::Flatten
- Inherits:
-
Base
- Object
- Base
- LogStash::Filters::Flatten
- Defined in:
- lib/logstash/filters/flatten.rb
Instance Method Summary collapse
Instance Method Details
#filter(event) ⇒ Object
17 18 19 20 21 22 23 |
# File 'lib/logstash/filters/flatten.rb', line 17 def filter(event) @fields.each do |field| next unless event.include?(field) next unless event.get(field).is_a?(Array) event.set(field, event.get(field).flatten) end end |
#register ⇒ Object
12 13 14 |
# File 'lib/logstash/filters/flatten.rb', line 12 def register # Nothing to do end |