logstash-codec-multiline 3.0.2 → 3.0.3

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: 9acabde77a66af389cc9dc1be951623dc8108f05
4
- data.tar.gz: b3d435c4bcc85c4c16b744ca9475f86d954171a8
3
+ metadata.gz: 26c71113b37e1292bbf9459af6716c724ee0f432
4
+ data.tar.gz: 6d75faf254ff4be96e8f37a1818a573e357e60be
5
5
  SHA512:
6
- metadata.gz: bbc3b8bf8bb1f1fec3057fac62d07f5280e0e29f202acbc370946c7b11da38f626df045106adf774ce8a3d74085bdb72219f9e6f4797623351b623e4459888c3
7
- data.tar.gz: 7ec3b568492bccf359bd6ca2e6abf2c702a9663d0ce161f697c566f8cf1c0b3c64489675118de88385fb6551fbe8a58a5670e992bf71bdb4f70238b99b65ccd6
6
+ metadata.gz: e75491ca1f12432d886c53ab7d6aa4a4d65bb4f77ce71381b063fb779a0fc3564ad860287c91ac07484241d8ddabf6217c743eef868e9776fe51b76a53725377
7
+ data.tar.gz: 450aed6a82000a797973c1bdb19dc031cdd7ac0acde846af8e088adc0f6df8371cc9ed73c010068b5079cb1d7ca61f178ab8b588685f0a2999727da4fd95f92c
@@ -1,3 +1,6 @@
1
+ ## 3.0.2
2
+ - Fix log levels
3
+
1
4
  ## 3.0.2
2
5
  - Relax constraint on logstash-core-plugin-api to >= 1.60 <= 2.99
3
6
 
@@ -151,13 +151,13 @@ module LogStash module Codecs class Multiline < LogStash::Codecs::Base
151
151
  end
152
152
 
153
153
  Dir.glob(path).each do |file|
154
- @logger.info("Grok loading patterns from file", :path => file)
154
+ @logger.debug("Grok loading patterns from file", :path => file)
155
155
  @grok.add_patterns_from_file(file)
156
156
  end
157
157
  end
158
158
 
159
159
  @grok.compile(@pattern)
160
- @logger.debug("Registered multiline plugin", :type => @type, :config => @config)
160
+ @logger.trace("Registered multiline plugin", :type => @type, :config => @config)
161
161
 
162
162
  reset_buffer
163
163
 
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-codec-multiline'
4
- s.version = '3.0.2'
4
+ s.version = '3.0.3'
5
5
  s.licenses = ['Apache License (2.0)']
6
6
  s.summary = "The multiline codec will collapse multiline messages and merge them into a single event."
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/logstash-plugin install gemname. This gem is not a stand-alone program"
@@ -217,7 +217,6 @@ describe LogStash::Codecs::Multiline do
217
217
 
218
218
  describe "auto flushing" do
219
219
  let(:config) { {} }
220
- let(:codec) { Mlc::MultilineRspec.new(config).tap {|c| c.register} }
221
220
  let(:events) { [] }
222
221
  let(:lines) do
223
222
  { "en.log" => ["hello world", " second line", " third line"],
@@ -237,6 +236,14 @@ describe LogStash::Codecs::Multiline do
237
236
  end
238
237
  end
239
238
 
239
+ let(:codec) do
240
+ Mlc::MultilineRspec.new(config).tap {|c| c.register}
241
+ end
242
+
243
+ before :each do
244
+ expect(LogStash::Codecs::Multiline).to receive(:logger).and_return(Mlc::MultilineLogTracer.new).at_least(:once)
245
+ end
246
+
240
247
  context "when auto_flush_interval is not set" do
241
248
  it "does not build any events" do
242
249
  config.update("pattern" => "^\\s", "what" => "previous")
@@ -254,9 +261,8 @@ describe LogStash::Codecs::Multiline do
254
261
  it "does not build any events, logs an error and the buffer data remains" do
255
262
  config.update("pattern" => "^\\s", "what" => "previous",
256
263
  "auto_flush_interval" => auto_flush_interval)
257
- codec.logger = Mlc::MultilineLogTracer.new
258
264
  line_producer.call("en.log")
259
- sleep(auto_flush_interval + 0.1)
265
+ sleep(auto_flush_interval + 0.2)
260
266
  msg, args = codec.logger.trace_for(:error)
261
267
  expect(msg).to eq("Multiline: flush downstream error")
262
268
  expect(args[:exception].message).to eq(errmsg)
@@ -87,11 +87,13 @@ module Mlc
87
87
  def error(*args) @tracer.push [:error, args]; end
88
88
  def debug(*args) @tracer.push [:debug, args]; end
89
89
  def info(*args) @tracer.push [:info, args]; end
90
+ def trace(*args) @tracer.push [:trace, args]; end
90
91
 
91
92
  def info?() true; end
92
93
  def debug?() true; end
93
94
  def warn?() true; end
94
95
  def error?() true; end
96
+ def trace?() true; end
95
97
  end
96
98
 
97
99
  class AutoFlushTracer < TracerBase
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-codec-multiline
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-14 00:00:00.000000000 Z
11
+ date: 2016-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  version: '0'
116
116
  requirements: []
117
117
  rubyforge_project:
118
- rubygems_version: 2.6.3
118
+ rubygems_version: 2.4.8
119
119
  signing_key:
120
120
  specification_version: 4
121
121
  summary: The multiline codec will collapse multiline messages and merge them into a single event.