urielha / log4stash

Module to Log log4net Messages to ElasticSearch
MIT License
60 stars 44 forks source link

log4stash v3.0.0 doesn't work with ElasticSearch 6.x #78

Open midczak opened 3 years ago

midczak commented 3 years ago

I faced issue logging to ElasticSearch in version 6.x after upgrade log4stash to v3.0.0 In the latest version requests that are send to Elastic doesn't contain field "_type" in body. it's not mandatory for Elastic version 7.x but without it requests fails for 6.x and lower.

Are there any plans for backward compatibility with older Elastic versions? Or maybe is there some way to make log4stash 3.0 working with older ES?

eran-gil commented 3 years ago

Hey, if you just add the "IndexType" parameter in the configuration it will work for you. Before v3.0.0 the type had a default value, now you have to specify it in order for it to be sent. FYI, since v3.0.0 every version is tested for usage with ElasticSearch v5.x, 6.X and 7.X.