You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm experiencing an issue with the outputTemplate in Serilog when trying to log JSON-formatted messages to the console. Instead of rendering the actual values, it outputs placeholder words such as {Timestamp:HH:mm:ss}, {Level:w3}, etc. I expected to see actual timestamps, severity levels, and messages in the log output.
Details:
Serilog Package ID and Version: Serilog 4.0.1
Toolchain, Framework, and OS: .NET 8 SDK on Windows 10.
Configuration:
Here’s a sample configuration for WriteTo in appsettings.json:
Hi! The formatter and outputTemplate options aren't compatible; if you want to customize the JSON format you might best look at using formatter with ExpressionTemplate.
Hi 👋,
I'm experiencing an issue with the outputTemplate in Serilog when trying to log JSON-formatted messages to the console. Instead of rendering the actual values, it outputs placeholder words such as {Timestamp:HH:mm:ss}, {Level:w3}, etc. I expected to see actual timestamps, severity levels, and messages in the log output.
Details:
Serilog Package ID and Version: Serilog 4.0.1
Toolchain, Framework, and OS: .NET 8 SDK on Windows 10.
Configuration:
Here’s a sample configuration for WriteTo in appsettings.json:
Current Behavior:
The console output currently shows the following instead of the actual values:
{"time": "{Timestamp:HH:mm:ss}", "severity": "inf", "msg": "Request finished HTTP/2 GET https://localhost:7026/_vs/browserLink - 200 null text/javascript; charset=UTF-8 215.1437ms", "exception": "", "correlationID": "e08cdf60b8bb30c12f7ae2db8f592935" }}
As shown, placeholder such as {Timestamp:HH:mm:ss} is not being replaced with actual values.
Thanks in advance!
The text was updated successfully, but these errors were encountered: