This repository was archived by the owner on Jun 1, 2024. It is now read-only.
This repository was archived by the owner on Jun 1, 2024. It is now read-only.
Segmentation fault Serilog.Sinks.Elasticsearch version 9.0.0 with Elasticsearch version 7.17 on macOS #517
Open
Description
Does this issue relate to a new feature or an existing bug?
- Bug
- New Feature
What version of Serilog.Sinks.Elasticsearch is affected? Please list the related NuGet package.
- Serilog.Sinks.Elasticsearch 8.4.1
- Serilog.Formatting.Elasticsearch 8.4.1
- Serilog.Sinks.Elasticsearch 9.0.0
- Serilog.Formatting.Elasticsearch 9.0.0
Others NuGet packages.
What is the target framework and operating system? See target frameworks & net standard matrix.
- .net 6
Please describe the current behavior?
When using Serilog.Sinks.Elasticsearch 9.0.0 on macOS:
dotnet TestService.dll
[1] 15227 segmentation fault dotnet TestService.dll
When using Serilog.Sinks.Elasticsearch 8.4.1 on macOS:
dotnet TestService.dll
[01:05:49 INF] Test <s:>
If the current behavior is a bug, please provide the steps to reproduce the issue and if possible a minimal demo of the problem
using Serilog;
try
{
var conf = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("appsettings.json")
.Build();
Log.Logger = new LoggerConfiguration()
.ReadFrom.Configuration(conf)
.CreateBootstrapLogger();
Log.Logger.Information("Test");
}
catch (Exception e)
{
Log.Fatal(e, "Stopped program because of exception!");
}
finally
{
await Log.CloseAndFlushAsync();
}
appsettings.json
{
"Serilog": {
"WriteTo": [
{
"Name": "Console",
"Args": {
"outputTemplate": "[{Timestamp:HH:mm:ss} {Level:u3}] {Message:lj} <s:{SourceContext}>"
}
},
{
"Name": "Elasticsearch",
"Args": {
"nodeUris": "http://localhost:9200/;",
"indexFormat": "Test-Server-{0:yyyy.MM}",
"inlineFields": true,
"batchPostingLimit": 30,
"restrictedToMinimumLevel": "Debug",
"bufferFileSizeLimitBytes": 5242880,
"bufferLogShippingInterval": 5000,
"bufferRetainedInvalidPayloadsLimitBytes": 5000,
"bufferFileCountLimit": 31,
"connectionTimeout": 5,
"emitEventFailure": "WriteToSelfLog",
"queueSizeLimit": "100000",
"autoRegisterTemplate": true,
"autoRegisterTemplateVersion": "ESv7",
"overwriteTemplate": false,
"registerTemplateFailure": "IndexAnyway",
"deadLetterIndexName": "deadletter-{0:yyyy.MM}"
}
}
]
}
}
docker-compose.yaml
version: '3.7'
services:
elasticsearch:
image: elasticsearch:7.17.0
ports:
- 9200:9200
- 9300:9300
environment:
ES_JAVA_OPTS: "-Xmx2048m -Xms2048m"
discovery.type: single-node
Metadata
Metadata
Assignees
Labels
No labels