logstash-output-http 5.6.0 → 5.6.1

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
  SHA256:
3
- metadata.gz: 652d47afcc760258e4dd50ff4ecc7c5418e0e8b70a07e72e23e8c62bde080158
4
- data.tar.gz: 38ecc6f8941d7e6690967d8601a39d43f365add3df4a5be3d553b5db3427ba44
3
+ metadata.gz: 23e48e61a55be36ec256a7a4449f2aaf555f56253f3bb15d67e250e03cd39bf9
4
+ data.tar.gz: b61f7df593739a7ba2d892c62e29952c514d9274a5219c321bd6c96b09d33adb
5
5
  SHA512:
6
- metadata.gz: a1f800d614b94d7c86fd1b00a3334c444ece5b44ac47937789d400ec033705b816f05c2f2f0a8f204a1badb0b7c1e885f4ce54be8a1ce89377a9d2ab526c74aa
7
- data.tar.gz: 047f61872bf497e485658acf016d55af655bbdaa3a04a5e521036a20e8b50ccb2ef5a89699d7879aa387030b0d6f1efcb08fc4ed69f92cb97f419a66aa15cb69
6
+ metadata.gz: a331795a25242f9f82c11746e6a3ecb619c18917dc91b77fb1f6ef8060a5ceb91d5effbfd171eeaac67ed8e7c12ad93ca3230ed279828ff8396dad71bd935882
7
+ data.tar.gz: 0fb511bb512aecf1caf602c44ed755c4be7c0c5a4781c651623dcaba5fc633f253611a7dd7bd25be2d1a66d52730ceb3e7e56ac031dfa8b093896f3e0bae63fc
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 5.6.1
2
+ - Added body logging for non 2xx responses [#142](https://github.com/logstash-plugins/logstash-output-http/pull/142)
3
+
1
4
  ## 5.6.0
2
5
  - Added standardized SSL settings and deprecates their non-standard counterparts. Deprecated settings will continue to work, and will provide pipeline maintainers with guidance toward using their standardized counterparts [#140](https://github.com/logstash-plugins/logstash-output-http/pull/140)
3
6
  - Added new `ssl_truststore_path`, `ssl_truststore_password`, and `ssl_truststore_type` settings for configuring SSL-trust using a PKCS-12 or JKS trust store, deprecating their `truststore`, `truststore_password`, and `truststore_type` counterparts.
@@ -154,12 +154,12 @@ class LogStash::Outputs::Http < LogStash::Outputs::Base
154
154
  end
155
155
 
156
156
  def log_error_response(response, url, event)
157
- log_failure(
158
- "Encountered non-2xx HTTP code #{response.code}",
159
- :response_code => response.code,
160
- :url => url,
161
- :event => event
162
- )
157
+ log_details = {
158
+ :code => response.code,
159
+ :body => response.body,
160
+ :url => url,
161
+ }
162
+ log_failure("Encountered non-2xx HTTP code", log_details)
163
163
  end
164
164
 
165
165
  def send_events(events)
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'logstash-output-http'
3
- s.version = '5.6.0'
3
+ s.version = '5.6.1'
4
4
  s.licenses = ['Apache License (2.0)']
5
5
  s.summary = "Sends events to a generic HTTP or HTTPS endpoint"
6
6
  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"
@@ -417,10 +417,10 @@ end
417
417
 
418
418
  RSpec.describe LogStash::Outputs::Http do # different block as we're starting web server with TLS
419
419
 
420
- @@default_server_settings = TestApp.server_settings.dup
420
+ let(:default_server_settings) { TestApp.server_settings.dup }
421
421
 
422
422
  before do
423
- TestApp.server_settings = @@default_server_settings.merge(webrick_config)
423
+ TestApp.server_settings = default_server_settings.merge(webrick_config)
424
424
 
425
425
  TestApp.last_request = nil
426
426
 
@@ -441,7 +441,7 @@ RSpec.describe LogStash::Outputs::Http do # different block as we're starting we
441
441
  @server.shutdown # WEBrick::HTTPServer
442
442
 
443
443
  TestApp.stop! rescue nil
444
- TestApp.server_settings = @@default_server_settings
444
+ TestApp.server_settings = default_server_settings
445
445
  end
446
446
 
447
447
  let(:ssl_cert_host) { 'localhost' }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-output-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.6.0
4
+ version: 5.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elastic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-09-01 00:00:00.000000000 Z
11
+ date: 2024-06-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement