logstash-output-elasticsearch 6.2.0-java → 6.2.1-java

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: 8d8fa5b44c2bf968c6460d25f27caf4f1b814467
4
- data.tar.gz: 3225315b016f698fcb2a29f48f180d79f8ae15ab
3
+ metadata.gz: e5784a9d0afcd410642c33e371a91d7a8111a233
4
+ data.tar.gz: 7b1587c58e64395a14632f4d9172a1357af2b8c7
5
5
  SHA512:
6
- metadata.gz: 55d2b2af8b3e15a814cfc2e592251488eadb8325a6b075976af4199f98df79b0e8d70ba3c7e27352a6f69c7e741255fd3b46b523efbbb1cd6c32a3f4e07847bb
7
- data.tar.gz: 18268aa5143178e89467b90f81c278cd449f49ba8b5e03d2a00ec7a4e3f5a05885ccba70252de25c4ebfc3e8137e9e28b3792a6af71b3de4cbf4665d0a642308
6
+ metadata.gz: 1711322d80f101e96e84ff8aa12d519d8226ab497abd458f1c492858c7ec0d7efa42f9893e5aea2234d8c7cd7ee32bc5a421d396db6888cfa25f7dcc47d0a7a5
7
+ data.tar.gz: 69564e37569720085ec839fd4ceae3210d2a63f31ae67ee2ee8ec4019af9325f7854e0da1641a966d1683ef9362afc295bdaee52201a1b280d0eca10cbb11421
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 6.2.1
2
+ - When an HTTP error is encountered, log the response body instead of the request.
3
+ The request body will still be logged at debug level.
4
+
1
5
  ## 6.2.0
2
6
  - Add version number / version conflict support
3
7
 
@@ -238,7 +238,10 @@ module LogStash; module Outputs; class ElasticSearch;
238
238
  sleep_interval = sleep_for_interval(sleep_interval)
239
239
  retry unless @stopping.true?
240
240
  else
241
- @logger.error("Got a bad response code from server, but this code is not considered retryable. Request will be dropped", :code => e.response_code, :body => e.body)
241
+ log_hash = {:code => e.response_code,
242
+ :response_body => e.response_body}
243
+ log_hash[:request_body] = e.request_body if @logger.debug?
244
+ @logger.error("Got a bad response code from server, but this code is not considered retryable. Request will be dropped", log_hash)
242
245
  end
243
246
  rescue => e
244
247
  # Stuff that should never happen
@@ -64,7 +64,7 @@ module LogStash; module Outputs; class ElasticSearch; class HttpClient;
64
64
  # template installation. We might need a better story around this later
65
65
  # but for our current purposes this is correct
66
66
  if resp.code < 200 || resp.code > 299 && resp.code != 404
67
- raise ::LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError.new(resp.code, request_uri, body)
67
+ raise ::LogStash::Outputs::ElasticSearch::HttpClient::Pool::BadResponseCodeError.new(resp.code, request_uri, body, resp.body)
68
68
  end
69
69
 
70
70
  resp
@@ -2,16 +2,17 @@ module LogStash; module Outputs; class ElasticSearch; class HttpClient;
2
2
  class Pool
3
3
  class NoConnectionAvailableError < Error; end
4
4
  class BadResponseCodeError < Error
5
- attr_reader :url, :response_code, :body
5
+ attr_reader :url, :response_code, :request_body, :response_body
6
6
 
7
- def initialize(response_code, url, body)
7
+ def initialize(response_code, url, request_body, response_body)
8
8
  @response_code = response_code
9
9
  @url = url
10
- @body = body
10
+ @request_body = request_body
11
+ @response_body = response_body
11
12
  end
12
13
 
13
14
  def message
14
- "Got response code '#{response_code}' contact Elasticsearch at URL '#{@url}'"
15
+ "Got response code '#{response_code}' contacting Elasticsearch at URL '#{@url}'"
15
16
  end
16
17
  end
17
18
  class HostUnreachableError < Error;
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
 
3
3
  s.name = 'logstash-output-elasticsearch'
4
- s.version = '6.2.0'
4
+ s.version = '6.2.1'
5
5
  s.licenses = ['apache-2.0']
6
6
  s.summary = "Logstash Output to Elasticsearch"
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"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-elasticsearch
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.2.0
4
+ version: 6.2.1
5
5
  platform: java
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-03 00:00:00.000000000 Z
11
+ date: 2017-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement