diff --git a/lib/logstash/outputs/jdbc.rb b/lib/logstash/outputs/jdbc.rb index 74c5829..674182c 100644 --- a/lib/logstash/outputs/jdbc.rb +++ b/lib/logstash/outputs/jdbc.rb @@ -45,7 +45,11 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base @logger.debug("Sending SQL to server", :event => event, :sql => statement.toString()) - statement.executeUpdate() + begin + statement.executeUpdate() + rescue Exception => e + @logger.error("JDBC Exception", :exception => e) + end statement.close() end