- Notifications
You must be signed in to change notification settings - Fork 149
Open
Feature
Copy link
Description
I have the following configuration with Serilog.Sinks.MSSqlServer v9.0.02:
"Serilog": { "Using": [ "Serilog.Sinks.MSSqlServer" ], "MinimumLevel": { "Default": "Information" }, "WriteTo": [ { "Name": "MSSqlServer", "Args": { "connectionString": "LogsConnection", "sinkOptionsSection": { "tableName": "Logs", "autoCreateSqlTable": true }, "restrictedToMinimumLevel": "Information", "columnOptionsSection": { "addStandardColumns": [ "LogEvent" ], "removeStandardColumns": [ "MessageTemplate", "Properties" ], "timeStamp": { "columnName": "Timestamp", "convertToUtc": true, }, "logEvent": { "excludeAdditionalProperties": false, "excludeStandardColumns": false } } } } ], "Enrich": [ "FromLogContext" ] }In particular, I have set the convertToUtc property of timeStamp column to true. With this configuration, I expect that also the Timestamp property in the JSON LogEvent column will be saved as UTC. However, I see values like this:
{ "Timestamp":"2025-12-12T08:30:25.4094643", "Level":"Information", "Message":"Request finished \"HTTP/2\" \"GET\" \"https\"://\"localhost:7164\"\"\"\"/api/ping\"\"\" - 200 0 null 39.3178ms", // ... }Where Timestamp property is missing the Z modifier.
mikedepetris
Metadata
Metadata
Assignees
Labels
No labels