-
Notifications
You must be signed in to change notification settings - Fork 150
Description
I have the following configuration with Serilog.Sinks.MSSqlServer v9.0.0:
{
"Serilog": {
"Using": [ "Serilog.Sinks.MSSqlServer" ],
"MinimumLevel": {
"Default": "Information"
},
"WriteTo": [
{
"Name": "MSSqlServer",
"Args": {
"connectionString": "...",
"sinkOptionsSection": {
"tableName": "Logs",
"autoCreateSqlTable": true
},
"columnOptionsSection": {
"addStandardColumns": [ "LogEvent", "TraceId", "SpanId" ],
"removeStandardColumns": [ "MessageTemplate", "Properties" ],
"id": { "dataType": "bigint" },
"timeStamp": {
"columnName": "Timestamp",
"convertToUtc": true,
"nonClusteredIndex": true,
"nonClusteredIndexDirection": "Desc"
},
"logEvent": {
"excludeAdditionalProperties": false,
"excludeStandardColumns": false
}
}
}
}
],
"Enrich": [ "FromLogContext" ]
}
}With this settings, I notice that when log messages don't contain SpanId or TraceId, in the database are written empty strings instead of NULL, even if the columns allow null:

totti240282 and nanny07
Metadata
Metadata
Assignees
Labels
No labels