lib/logstash/inputs/jdbc.rb in logstash-integration-jdbc-5.2.4 vs lib/logstash/inputs/jdbc.rb in logstash-integration-jdbc-5.2.5
- old
+ new
@@ -257,12 +257,12 @@
unless validation_errors.empty?
raise(LogStash::ConfigurationError, "Prepared Statement Mode validation errors: " + validation_errors.join(", "))
end
end
- set_value_tracker(LogStash::PluginMixins::Jdbc::ValueTracking.build_last_value_tracker(self))
- set_statement_logger(LogStash::PluginMixins::Jdbc::CheckedCountLogger.new(@logger))
+ set_value_tracker LogStash::PluginMixins::Jdbc::ValueTracking.build_last_value_tracker(self)
+ set_statement_handler LogStash::PluginMixins::Jdbc::StatementHandler.build_statement_handler(self)
@enable_encoding = !@charset.nil? || !@columns_charset.empty?
if (@jdbc_password_filepath and @jdbc_password)
raise(LogStash::ConfigurationError, "Only one of :jdbc_password, :jdbc_password_filepath may be set at a time.")
@@ -281,11 +281,11 @@
end
end
end # def register
# test injection points
- def set_statement_logger(instance)
- @statement_handler = LogStash::PluginMixins::Jdbc::StatementHandler.build_statement_handler(self, instance)
+ def set_statement_handler(handler)
+ @statement_handler = handler
end
def set_value_tracker(instance)
@value_tracker = instance
end