Hello I am trying to follow the example in the following nuget package:
I got the following error:
Buffer Options does not contain a definition for ConcurrentConsumers
this is the code in program.cs (NET 6):
Log.Logger = (Serilog.ILogger)new LoggerConfiguration()
.MinimumLevel.Debug()
.Enrich.FromLogContext()
.WriteTo.Elasticsearch(new[] { new Uri("http://localhost:9200") }, opts =>
{
opts.DataStream = new DataStreamName("logs", "console-example", "demo");
opts.BootstrapMethod = BootstrapMethod.Failure;
opts.ConfigureChannel = channelOpts =>
{
channelOpts.BufferOptions = new BufferOptions
{
ConcurrentConsumers = 10
};
};
});
If I remove that property and run (It is just the default demo api about wheater)
it throw this error:
Object reference not set to an instance of an object
Would someone help me?