Update jdbc.rb
Removes improper nil check which breaks event sprintf formatting examples
This commit is contained in:
parent
275cd6fc2f
commit
ebe5596469
|
@ -121,10 +121,12 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base
|
||||||
statement.setBoolean(idx + 1, true)
|
statement.setBoolean(idx + 1, true)
|
||||||
when false
|
when false
|
||||||
statement.setBoolean(idx + 1, false)
|
statement.setBoolean(idx + 1, false)
|
||||||
when nil
|
|
||||||
statement.setString(idx + 1, nil)
|
|
||||||
else
|
else
|
||||||
|
if event[i].nil? and i =~ /%{/
|
||||||
statement.setString(idx + 1, event.sprintf(i))
|
statement.setString(idx + 1, event.sprintf(i))
|
||||||
|
else
|
||||||
|
statement.setString(idx + 1, nil)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user