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

- old
+ new

@@ -260,10 +260,18 @@ def normalize_key(prefix_key) prefix_key.gsub(PathValidator.matches_re, PREFIX_KEY_NORMALIZE_CHARACTER) end + def upload_options + { + :acl => @canned_acl, + :server_side_encryption => @server_side_encryption ? :aes256 : nil, + :content_encoding => @encoding == "gzip" ? "gzip" : nil + } + end + private # We start a task in the background for check for stale files and make sure we rotate them to S3 if needed. def start_periodic_check @logger.debug("Start periodic rotation check") @@ -284,17 +292,9 @@ Aws::S3::Bucket.new(@bucket, full_options) end def aws_service_endpoint(region) { :s3_endpoint => region == 'us-east-1' ? 's3.amazonaws.com' : "s3-#{region}.amazonaws.com"} - end - - def upload_options - { - :acl => @cannel_acl, - :server_side_encryption => @server_side_encryption ? :aes256 : nil, - :content_encoding => @encoding == "gzip" ? "gzip" : nil - } end def rotate_if_needed(prefixes) prefixes.each do |prefix| # Each file access is thread safe,