lib/logstash/outputs/s3/uploader.rb in logstash-output-s3-4.0.3 vs lib/logstash/outputs/s3/uploader.rb in logstash-output-s3-4.0.5

- old
+ new

@@ -40,14 +40,17 @@ # When we get here it usually mean that S3 tried to do some retry by himself (default is 3) # When the retry limit is reached or another error happen we will wait and retry. # # Thread might be stuck here, but I think its better than losing anything # its either a transient errors or something bad really happened. - logger.error("Uploading failed, retrying", :exception => e, :path => file.path, :backtrace => e.backtrace) + logger.error("Uploading failed, retrying", :exception => e.class, :message => e.message, :path => file.path, :backtrace => e.backtrace) retry end options[:on_complete].call(file) unless options[:on_complete].nil? + rescue => e + logger.error("An error occured in the `on_complete` uploader", :exception => e.class, :message => e.message, :path => file.path, :backtrace => e.backtrace) + raise e # reraise it since we don't deal with it now end def stop @workers_pool.shutdown @workers_pool.wait_for_termination(nil) # block until its done