logstash-codec-gzip 2.0.4 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1cc6a6074faa368c9c1eac11c06dd06ac27e448a
4
- data.tar.gz: dd09655218341496b37d1a8e5cbc6237390ab208
3
+ metadata.gz: 14db63172e2909c073bb68d02e784008686f808d
4
+ data.tar.gz: 2e886f86832d3c80077534d6282c52528fa875af
5
5
  SHA512:
6
- metadata.gz: 92383a43991e429a9b1809a774dea5a8e159b8b33e6d1922c3576ba735d5d3addde2bc9396b01be91d7288de4169907f0032f471d1ee3597d687299018dcc0f3
7
- data.tar.gz: a77dbab937da49efa503dc93b50cf92ba4c5783b4afd70722f63b1c562f8dcf0cdb14ba1d0bc63e3bbc9448c5431734313be9f17d28f0b3dc718d5e117f8f754
6
+ metadata.gz: 3a994e0b689684e194604d1ae6978c7d405b4abb7a0218e1dac0cc13753f4de6e2bbfc51d81a9d09d6d0c27e978d0d57c267ecc847101b82d62a7444cd8daa85
7
+ data.tar.gz: 96e56359e1226a666fc558945829927c24fdada0926c4168dd2691d996b612c684b3b1f7bdea8c6e26836c40eb69d840235426df3c929bf50a525a4082e82d5e
@@ -23,6 +23,8 @@ class LogStash::Codecs::GZIP < LogStash::Codecs::Base
23
23
  # For nxlog users, you may to set this to "CP1252".
24
24
  config :charset, :validate => ::Encoding.name_list, :default => "UTF-8"
25
25
 
26
+ MESSAGE_FIELD = "message".freeze
27
+
26
28
  public
27
29
  def register
28
30
  @converter = LogStash::Util::Charset.new(@charset)
@@ -33,10 +35,10 @@ class LogStash::Codecs::GZIP < LogStash::Codecs::Base
33
35
  def decode(data)
34
36
  begin
35
37
  decoded = Zlib::GzipReader.new(StringIO.new(data)).read
36
- yield LogStash::Event.new("message" => @converter.convert(decoded))
38
+ yield LogStash::Event.new(MESSAGE_FIELD => @converter.convert(decoded))
37
39
  rescue Zlib::Error, Zlib::GzipFile::Error=> e
38
- @logger.info? && @logger.info("GZIP parse failure. Falling back to plain-text", :error => e, :data => data)
39
- yield LogStash::Event.new("message" => data, "tags" => ["_gzipparsefailure"])
40
+ @logger.info? && @logger.info("Gzip codec: GZIP parse failure. Falling back to plain-text", :error => e, :data => data)
41
+ yield LogStash::Event.new(MESSAGE_FIELD => @converter.convert(data), "tags" => ["_gzipparsefailure"])
40
42
  end
41
43
  end # def decode
42
44
  end # class LogStash::Codecs::JSON
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-codec-gzip'
4
- s.version = '2.0.4'
4
+ s.version = '3.0.0'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "This codec may be used to decode (via inputs) and encode (via outputs) full gzip messages"
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"
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
  s.metadata = { "logstash_plugin" => "true", "logstash_group" => "codec" }
21
21
 
22
22
  # Gem dependencies
23
- s.add_runtime_dependency "logstash-core", "< 2.0.0"
23
+ s.add_runtime_dependency "logstash-core-plugin-api", ">= 1.60", "<= 2.99"
24
24
 
25
25
  s.add_development_dependency 'logstash-devutils'
26
26
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-codec-gzip
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
@@ -11,19 +11,25 @@ cert_chain: []
11
11
  date: 2018-10-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: logstash-core
14
+ name: logstash-core-plugin-api
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - <
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '1.60'
20
+ - - <=
18
21
  - !ruby/object:Gem::Version
19
- version: 2.0.0
22
+ version: '2.99'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - <
27
+ - - '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '1.60'
30
+ - - <=
25
31
  - !ruby/object:Gem::Version
26
- version: 2.0.0
32
+ version: '2.99'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: logstash-devutils
29
35
  requirement: !ruby/object:Gem::Requirement