From 4287c01037b93ef4dc28ddd4bedc35cb87ca7a37 Mon Sep 17 00:00:00 2001 From: Karl Southern Date: Wed, 22 Jul 2015 16:30:37 +0100 Subject: [PATCH] Small style fix up for patch --- lib/logstash/outputs/jdbc.rb | 20 ++++++++++---------- logstash-output-jdbc.gemspec | 2 +- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/logstash/outputs/jdbc.rb b/lib/logstash/outputs/jdbc.rb index 32893fa..45ae2d9 100644 --- a/lib/logstash/outputs/jdbc.rb +++ b/lib/logstash/outputs/jdbc.rb @@ -117,13 +117,13 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base statement.setFloat(idx + 1, event[i]) when String statement.setString(idx + 1, event[i]) - when true - statement.setBoolean(idx + 1, true) - when false - statement.setBoolean(idx + 1, false) - when nil - statement.setString(idx + 1, nil) - else + when true + statement.setBoolean(idx + 1, true) + when false + statement.setBoolean(idx + 1, false) + when nil + statement.setString(idx + 1, nil) + else statement.setString(idx + 1, event.sprintf(i)) end end @@ -139,9 +139,9 @@ class LogStash::Outputs::Jdbc < LogStash::Outputs::Base # Since the exceutebatch failed this should mean any events failed to be # inserted will be re-run. We're going to log it for the lols anyway. @logger.warn("JDBC - Exception. Will automatically retry", :exception => e) - if e.getNextException() != nil - @logger.warn("JDBC - Exception. Will automatically retry", :exception => e.getNextException()) - end + if e.getNextException() != nil + @logger.warn("JDBC - Exception. Will automatically retry", :exception => e.getNextException()) + end end statement.close() diff --git a/logstash-output-jdbc.gemspec b/logstash-output-jdbc.gemspec index fc43623..98512e3 100644 --- a/logstash-output-jdbc.gemspec +++ b/logstash-output-jdbc.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'logstash-output-jdbc' - s.version = "0.1.0" + s.version = "0.1.1" s.licenses = [ "Apache License (2.0)" ] s.summary = "This plugin allows you to output to SQL, via JDBC" s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"