Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Commit to add is_gzipped into the mix for making optional checks on compressed files without gz extensions. #181

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion lib/logstash/inputs/s3.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ class LogStash::Inputs::S3 < LogStash::Inputs::Base
# be present.
config :include_object_properties, :validate => :boolean, :default => false

# Pass boolean to see if the source file may not have the .gz extension but is actually zipped.
config :is_gzipped, :validate => :boolean, :default => false

public
def register
require "fileutils"
Expand Down Expand Up @@ -315,7 +318,7 @@ def read_gzip_file(filename, block)

private
def gzip?(filename)
filename.end_with?('.gz','.gzip')
filename.end_with?('.gz','.gzip') or @is_gzipped
end

private
Expand Down
2 changes: 1 addition & 1 deletion logstash-input-s3.gemspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Gem::Specification.new do |s|

s.name = 'logstash-input-s3'
s.version = '3.4.1'
s.version = '3.4.2'
s.licenses = ['Apache-2.0']
s.summary = "Streams events from files in a S3 bucket"
s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash core pipeline using $LS_HOME/bin/logstash-plugin install gemname. This gem is not a stand-alone program"
Expand Down