class LogStash::Filters::Field

Public Instance Methods

filter(event) click to toggle source
# 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() click to toggle source
# File lib/logstash/filters/field.rb, line 13
def register
  # nothing to do
end