internetitem / logback-elasticsearch-appender

Logback Elasticsearch Appender
Other
233 stars 137 forks source link

Content-Type text/plain? #55

Closed clgoh closed 5 years ago

clgoh commented 6 years ago

Hi,

Excuse me if I'm misusing this but I couldn't find any more direct channel of communication. This is more of a question rather than issue: Under the usage section of the README.md there is a <header> element under the appender configuration block.

When should we decide to use text/plain when when should we use something else? Why was it text/plain instead of application/x-ndjson like what is described on ElasticSearch's API Official Doc

Thank you in advance!

Best Regards, Lim

ewolff commented 5 years ago

I suspect this is an error. More recent versions of Elasticsearch require a content type of application/json if JSON is transferred. If you use the configuration as provided, this leads to an error. I have created a PR: https://github.com/internetitem/logback-elasticsearch-appender/pull/58

abatkin commented 5 years ago

That makes sense, I've merged the PR which updates the README