logstash-plugins/logstash-output-http

Display the HTTP response message in case of error

LionelCons opened this issue · 0 comments

Currently, in case of error, only the HTTP response code is displayed:

[2017-05-30T10:23:04,151][ERROR][logstash.outputs.http    ] [HTTP Output Failure] Encountered non-2xx HTTP code 400 {:response_code=>400, :url=>"http://a.b.c:123/", :event=>xxx, :will_retry=>false}

However, the HTTP response message (aka "reason phrase") could contain useful information. In the example above, the server replied with:

HTTP/1.1 400 Bad request from client. Request has invalid JSON Syntax:[xxx]

Could the plugin error message please be extended to also report the HTTP response message?