markmcdowell / NLog.Targets.ElasticSearch

NLog target for Elasticsearch
MIT License
176 stars 89 forks source link

Exclude default fields (@timestamp, level, message) #138

Closed ShujaARizvi closed 3 years ago

ShujaARizvi commented 3 years ago

I want to use my own fields for timestamp, level, and message. But the default fields make my data redundant. Need to exclude these default fields but not sure how to.

snakefoot commented 3 years ago

You can use enableJsonLayout="true" to provide you own custom JsonPayload. See also #125

EddLonzanida commented 3 years ago

Check out this pull request: https://github.com/markmcdowell/NLog.Targets.ElasticSearch/pull/147

snakefoot commented 3 years ago

@markmcdowell This issue can now be resolved. NLog.Targets.ElasticSearch .ver 7.6.0 includes the option IncludeDefaultFields