Class: LogStash::Filters::Jdbc::Lookup::Getfier
- Inherits:
-
Object
- Object
- LogStash::Filters::Jdbc::Lookup::Getfier
- Defined in:
- lib/logstash/filters/jdbc/lookup.rb
Instance Method Summary collapse
- #fetch(event, result) ⇒ Object
-
#initialize(param) ⇒ Getfier
constructor
A new instance of Getfier.
Constructor Details
#initialize(param) ⇒ Getfier
Returns a new instance of Getfier.
26 27 28 |
# File 'lib/logstash/filters/jdbc/lookup.rb', line 26 def initialize(param) @param = param end |
Instance Method Details
#fetch(event, result) ⇒ Object
30 31 32 33 34 35 36 |
# File 'lib/logstash/filters/jdbc/lookup.rb', line 30 def fetch(event, result) value = event.get(@param) if value.nil? || value.is_a?(Hash) || value.is_a?(Array) # Array or Hash is not suitable result.invalid_parameters_push(@param) end value end |