lib/logstash/outputs/charrington/process.rb in logstash-output-charrington-0.3.6 vs lib/logstash/outputs/charrington/process.rb in logstash-output-charrington-0.3.7

- old
+ new

@@ -4,10 +4,11 @@ class Process # This service starts the process of attempting to insert a row. # It handles retries where applicable. include Service + include LogStash::Util::Loggable attr_reader :event, :connection, :opts, :max_retries, :schema, :retry_max_interval, :driver attr_accessor :retry_interval, :should_retry Error = Class.new(StandardError) ProcessFailed = Class.new(Error) @@ -30,13 +31,16 @@ def call while should_retry do transformed = case driver when "redshift" + self.logger.info "Found driver for redshift with event of: #{event}" Charrington::TransformRedshift.call(event) else + self.logger.info "Found driver for postgres with event of: #{event}" Charrington::TransformPostgres.call(event) end + self.logger.info "Transformed event into: #{transformed}" should_retry = Charrington::Insert.call(connection, transformed, opts) break if !should_retry @attempts += 1 break if @attempts > max_retries