lib/logstash/outputs/s3.rb in logstash-output-s3-2.0.3 vs lib/logstash/outputs/s3.rb in logstash-output-s3-2.0.4

- old
+ new

@@ -56,11 +56,10 @@ # secret_access_key => "monkey_access_key" (required) # endpoint_region => "eu-west-1" (required) # bucket => "boss_please_open_your_bucket" (required) # size_file => 2048 (optional) # time_file => 5 (optional) -# format => "plain" (optional) # canned_acl => "private" (optional. Options are "private", "public_read", "public_read_write", "authenticated_read". Defaults to "private" ) # } # class LogStash::Outputs::S3 < LogStash::Outputs::Base include LogStash::PluginMixins::AwsConfig @@ -115,11 +114,11 @@ # Example: # tags => ["elasticsearch", "logstash", "kibana"] # # Will generate this file: # "ls.s3.logstash.local.2015-01-01T00.00.tag_elasticsearch.logstash.kibana.part0.txt" - # + # config :tags, :validate => :array, :default => [] # Exposed attributes for testing purpose. attr_accessor :tempfile attr_reader :page_counter @@ -131,11 +130,11 @@ end def aws_service_endpoint(region) # Make the deprecated endpoint_region work # TODO: (ph) Remove this after deprecation. - + if @endpoint_region region_to_use = @endpoint_region else region_to_use = @region end @@ -238,11 +237,11 @@ delete_on_bucket(test_filename) ensure File.delete(test_filename) end end - + public def restore_from_crashes @logger.debug("S3: is attempting to verify previous crashes...") Dir[File.join(@temporary_directory, "*.#{TEMPFILE_EXTENSION}")].each do |file| @@ -286,11 +285,11 @@ end end public def receive(event) - + @codec.encode(event) end public def rotate_events_log? @@ -344,10 +343,10 @@ next_page create_temporary_file else @logger.debug("S3: tempfile file size report.", :tempfile_size => @tempfile.size, :size_file => @size_file) end - end + end write_to_tempfile(encoded_event) end private