diff --git a/CHANGELOG.md b/CHANGELOG.md index 376a3fa..1071e9c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,6 @@ +## 5.6.1 + - Added body logging for non 2xx responses [#142](https://github.com/logstash-plugins/logstash-output-http/pull/142) + ## 5.6.0 - 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) - 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. diff --git a/lib/logstash/outputs/http.rb b/lib/logstash/outputs/http.rb index 56a4012..7f54761 100644 --- a/lib/logstash/outputs/http.rb +++ b/lib/logstash/outputs/http.rb @@ -154,12 +154,12 @@ def log_retryable_response(response) end def log_error_response(response, url, event) - log_failure( - "Encountered non-2xx HTTP code #{response.code}", - :response_code => response.code, - :url => url, - :event => event - ) + log_details = { + :code => response.code, + :body => response.body, + :url => url, + } + log_failure("Encountered non-2xx HTTP code", log_details) end def send_events(events) diff --git a/logstash-output-http.gemspec b/logstash-output-http.gemspec index cfb42e7..a309dc5 100644 --- a/logstash-output-http.gemspec +++ b/logstash-output-http.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |s| s.name = 'logstash-output-http' - s.version = '5.6.0' + s.version = '5.6.1' s.licenses = ['Apache License (2.0)'] s.summary = "Sends events to a generic HTTP or HTTPS endpoint" 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"