elastic / ecs-dotnet

https://www.elastic.co/guide/en/ecs-logging/dotnet/current/setup.html
Apache License 2.0
119 stars 59 forks source link

Creating a data stream per log level in Elasticsearch #427

Open ArminShoeibi opened 2 months ago

ArminShoeibi commented 2 months ago

Hi there,

Do we have a feature like Index Decider in https://github.com/elastic/ecs-dotnet/tree/main/src/Elastic.Serilog.Sinks to create indexes per log level and date in the Data stream?

Here you can see IndexDecider and its tests

https://github.com/serilog-contrib/serilog-sinks-elasticsearch/blob/dev/src/Serilog.Sinks.Elasticsearch/Sinks/ElasticSearch/ElasticsearchSinkOptions.cs#L191

https://github.com/serilog-contrib/serilog-sinks-elasticsearch/blob/dev/test/Serilog.Sinks.Elasticsearch.Tests/IndexDeciderTests.cs