Class: LogStash::Filters::Field
- Defined in:
- lib/logstash/filters/field.rb
Defined Under Namespace
Classes: EvalSpace
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
Constructor Details
This class inherits a constructor from LogStash::Filters::Base
Instance Method Details
#filter(event) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/logstash/filters/field.rb', line 18 def filter(event) data = EvalSpace.new(event.to_hash) @config.each do |condition| if data.instance_eval(condition) return # This event is OK, matches the condition. end end event.cancel end |
#register ⇒ Object
13 14 15 |
# File 'lib/logstash/filters/field.rb', line 13 def register # nothing to do end |