lib/fluent/plugin/out_s3.rb in fluent-plugin-s3-hubspot-1.0.0.rc6.8 vs lib/fluent/plugin/out_s3.rb in fluent-plugin-s3-hubspot-1.0.0.rc7

- old
+ new

@@ -266,11 +266,11 @@ tmp = Tempfile.new("s3-") tmp.binmode begin @compressor.compress(chunk, tmp) tmp.rewind - log.debug "out_s3: write chunk #{dump_unique_id_hex(chunk.unique_id)} with metadata #{chunk.metadata} to s3://#{@s3_bucket}/#{s3path}" + log.debug { "out_s3: write chunk: {key:#{chunk.key},tsuffix:#{tsuffix(chunk)}} to s3://#{@s3_bucket}/#{s3path}" } put_options = { body: tmp, content_type: @compressor.content_type, storage_class: @storage_class, @@ -283,19 +283,19 @@ put_options[:acl] = @acl if @acl if @s3_metadata put_options[:metadata] = {} @s3_metadata.each do |k, v| - put_options[:metadata][k] = extract_placeholders(v, metadata).gsub(%r(%{[^}]+}), {"%{index}" => i - 1}) + put_options[:metadata][k] = extract_placeholders(v, metadata) end end @bucket.object(s3path).put(put_options) @values_for_s3_object_chunk.delete(chunk.unique_id) if @warn_for_delay if Time.at(chunk.metadata.timekey) < Time.now - @warn_for_delay - log.warn "out_s3: delayed events were put to s3://#{@s3_bucket}/#{s3path}" + log.warn { "out_s3: delayed events were put to s3://#{@s3_bucket}/#{s3path}" } end end ensure tmp.close(true) rescue nil end