logstash-output-s3-leprechaun-fork 1.0.11 → 1.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 97421396c470a83e422079643f14effb54cd87ca
4
- data.tar.gz: 97dcd2833bab56c8af186e3f97713b3e91750a70
3
+ metadata.gz: b4d4a035506bfea17656d618d97ae590e3b76254
4
+ data.tar.gz: 7e11cf877da0ceecbdf5a3383cf8d56a842f26d7
5
5
  SHA512:
6
- metadata.gz: 4a4f67f320ef2a3a74a1f8545f0084312add6f3b6e39d9c3d2d15d3086a973a03e0b134ce7ef01f51f09225c15125fbfc69df4eda32b067533065f738287eb82
7
- data.tar.gz: 562e58f1b0e3cf079eda1b0c57d1ce0a7338aac1bdb3d6a7291846dd2f9bdc3fe4c854f7d99fb528167ea1ae19a0dd3bcc40f333c22e41f139ceff63c60dc6d1
6
+ metadata.gz: e815ccb950cb4c0c6d02af82817b351842a30bf2ed7f84674eb553df74566e2e45c014aa0e322ae316f2a233ca890d7147916809882184aa6b3574f57ea327e6
7
+ data.tar.gz: e444597e6a89cce44125be7546f319e4657ff10299277faa936828869b883cd0b58acdf3046e56a7ca39aab033e5e9fe66af22481c92e32d9da1bb03fb0f9d3a
@@ -65,7 +65,7 @@ require "fileutils"
65
65
  class LogStash::Outputs::S3 < LogStash::Outputs::Base
66
66
  include LogStash::PluginMixins::AwsConfig
67
67
 
68
- TEMPFILE_EXTENSION = ".log.gz"
68
+ TEMPFILE_EXTENSION = "log.gz"
69
69
  S3_INVALID_CHARACTERS = /[\^`><]/
70
70
 
71
71
  config_name "s3"
@@ -310,9 +310,9 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
310
310
  @logger.info("segregation 2: #{@segregations[segregation].inspect}")
311
311
 
312
312
  new_file_name = get_temporary_filename(
313
- @segregations[segregation][:directory],
314
- @segregations[segregation][:file_base],
315
- @segregations[segregation][:current_page]
313
+ directory,
314
+ file,
315
+ 0
316
316
  )
317
317
 
318
318
  @segregations[segregation] = {
@@ -321,9 +321,7 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
321
321
  :file_base => file,
322
322
  :current_page => 0,
323
323
  :file_pointers => {
324
- 0 => Zlib::GzipWriter.open(
325
- new_file_name,
326
- 'a')
324
+ 0 => Zlib::GzipWriter.open(new_file_name)
327
325
  }
328
326
  }
329
327
 
@@ -339,7 +337,7 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
339
337
 
340
338
  def commit_locally(segregation, event, encoded_event)
341
339
  seg = @segregations[segregation]
342
- if seg[:file_pointers][seg[:current_page]].syswrite(encoded_event)
340
+ if seg[:file_pointers][seg[:current_page]].write(encoded_event)
343
341
  @logger.info("S3> commit_locally: write success (file: #{seg[:file_pointers][seg[:current_page]].path}")
344
342
  else
345
343
  # What do?
@@ -352,7 +350,7 @@ class LogStash::Outputs::S3 < LogStash::Outputs::Base
352
350
  def should_commit?(segregation)
353
351
  begin
354
352
  seg = @segregations[segregation]
355
- if @size_file > 0 and seg[:file_pointers][seg[:current_page]].size > @size_file
353
+ if @size_file > 0 and File.size(seg[:file_pointers][seg[:current_page]].path) > @size_file
356
354
  @logger.info("S3> should_commit: upload because of size")
357
355
  return true
358
356
  end
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-s3-leprechaun-fork'
4
- s.version = '1.0.11'
4
+ s.version = '1.0.12'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "This plugin was created for store the logstash's events into Amazon Simple Storage Service (Amazon S3)"
7
7
  s.description = "This gem is a logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/plugin install gemname. This gem is not a stand-alone program"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-s3-leprechaun-fork
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.11
4
+ version: 1.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Laurence MacGuire