-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Serilog 4.0 built-in UtcTimestamp token in output template #164
Labels
Comments
ManuelRin
added a commit
to ManuelRin/serilog-sinks-console
that referenced
this issue
Dec 3, 2024
ManuelRin
added a commit
to ManuelRin/serilog-sinks-console
that referenced
this issue
Dec 3, 2024
…plate (OutputTemplateRenderer) Implements serilog#164
2 tasks
ManuelRin
added a commit
to ManuelRin/serilog-sinks-console
that referenced
this issue
Dec 4, 2024
- assert that UtcTimestamp in default format (no custom format string) renders without the +00:00 time-zone suffix. Relates to serilog#164
ManuelRin
added a commit
to ManuelRin/serilog-sinks-console
that referenced
this issue
Dec 4, 2024
…standard formating - keep render performance in mind / i.e. keep optimizations from serilog#134 - ensure UtcTimestamp without format string is rendered without " +00:00" suffix by rendering as DateTime (same behavior as Serilog's MessageTemplateTextFormatter) Relates to serilog#164
ManuelRin
added a commit
to ManuelRin/serilog-sinks-console
that referenced
this issue
Feb 17, 2025
…n enhanced - round-trip standard format string added to tests - for Timestamp the +00:00 format is expected, for UtcTimestamp the Z suffix is expected Relates to serilog#164
ManuelRin
added a commit
to ManuelRin/serilog-sinks-console
that referenced
this issue
Feb 17, 2025
… Theory to improve maintainability For better maintainability the multi-line strings with several tokens and formats of Fact unit tests are replaced by Theory with InlineData for better maintainability/readability. Relates to serilog#164
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Package affected: Serilog.Sinks.Console 6.0.0
Target framework: net8.0
OS: Windows 10
Serilog 4.0.0 came with a new built-in support for an
UtcTimestamp
token in addition to the existingTimestamp
token for output templates. This feature was introduced via Serilog PR #2051.The Serilog.Sinks.Console package in version 6.0.0 (although requiring Serilog 4.0.0+) doesn't seem to support this new built-in token yet. It would be great if support could be added to Serilog.Sinks.Console as well.
Repro steps:
An output template like the following (from the readme example):
will output the log entry's timestamp in local time (ignoring the time zone offset).
Now change the output template to use the new Serilog built-in
UtcTimestamp
token like this:Actual behavior:
Expected behavior:
Let me know if need more info is needed!
Best regards!
The text was updated successfully, but these errors were encountered: