Update jdbc.rb

Removes improper nil check which breaks event sprintf formatting examples
This commit is contained in:
Karl 2015-11-06 14:55:24 +00:00
parent 275cd6fc2f
commit ebe5596469

View File

@ -121,10 +121,12 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
statement.setBoolean(idx + 1, true)
when false
statement.setBoolean(idx + 1, false)
when nil
statement.setString(idx + 1, nil)
else
if event[i].nil? and i =~ /%{/
statement.setString(idx + 1, event.sprintf(i))
else
statement.setString(idx + 1, nil)
end
end
end