Class: LogStash::Filters::Dissect
- Inherits:
-
Base
- Object
- Base
- LogStash::Filters::Dissect
- Defined in:
- lib/logstash/filters/dissect.rb
Instance Method Summary collapse
- #filter(event) ⇒ Object
-
#increment_failures_metric ⇒ Object
the JRuby Extension ‘initialize` method stores a DynamicMethod reference to this method.
-
#increment_matches_metric ⇒ Object
the JRuby Extension ‘initialize` method stores a DynamicMethod reference to this method.
-
#metric_increment(metric_name) ⇒ Object
this method is stubbed during testing a reference to it in the JRuby Extension ‘initialize` may not be valid.
- #multi_filter(events) ⇒ Object
- #register ⇒ Object
Instance Method Details
#filter(event) ⇒ Object
175 176 177 178 179 |
# File 'lib/logstash/filters/dissect.rb', line 175 def filter(event) # all plugin functions happen in the JRuby extension: # debug, warn and error logging, filter_matched, tagging etc. @dissector.dissect(event) end |
#increment_failures_metric ⇒ Object
the JRuby Extension ‘initialize` method stores a DynamicMethod reference to this method
199 200 201 |
# File 'lib/logstash/filters/dissect.rb', line 199 def increment_failures_metric metric_increment(:failures) end |
#increment_matches_metric ⇒ Object
the JRuby Extension ‘initialize` method stores a DynamicMethod reference to this method
194 195 196 |
# File 'lib/logstash/filters/dissect.rb', line 194 def increment_matches_metric metric_increment(:matches) end |
#metric_increment(metric_name) ⇒ Object
this method is stubbed during testing a reference to it in the JRuby Extension ‘initialize` may not be valid
189 190 191 |
# File 'lib/logstash/filters/dissect.rb', line 189 def metric_increment(metric_name) metric.increment(metric_name) end |
#multi_filter(events) ⇒ Object
181 182 183 184 185 |
# File 'lib/logstash/filters/dissect.rb', line 181 def multi_filter(events) LogStash::Util.set_thread_plugin(self) @dissector.dissect_multi(events) events end |
#register ⇒ Object
170 171 172 173 |
# File 'lib/logstash/filters/dissect.rb', line 170 def register needs_decoration = @add_field.size + @add_tag.size + @remove_field.size + @remove_tag.size > 0 @dissector = LogStash::Dissector.new(@mapping, self, @convert_datatype, needs_decoration) end |