-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Customization of the timestamp format #311
Comments
Support customising the format of the timestamps. Resolves #311.
Thanks for your suggestion @rdewaele! I've opened a PR to implement this in #313. Could you take a look and see if it would work as you'd envisioned? You'd be able to configure a different format for the timestamps like this: xunit-logging/tests/Logging.XUnit.Tests/IntegrationTests.cs Lines 177 to 183 in e8c828a
The default behaviour would be the same as it is in the existing versions, which is to use the |
Thanks a lot for the incredibly quick implementation. I will be experimenting with it today. Thanks! |
This implementation covers all my (current ;-)) use-cases, so I am a happy camper. 👍 Thanks again. :-) |
Great thanks, I'll release this to NuGet later on today. |
Support customising the format of the timestamps. Resolves #311.
Is your feature request related to a problem? Please describe.
The current timestamp format (e.g.
[2022-05-17 00:08:36Z]
) does not have sub-second timing information, which limits the diagnostic potential of the timestamp.Describe the solution you'd like
If customization of the log format is currently possible, I missed it.
In this event, I would like to both apologize and suggest adding an example describing this use-case.
The following solutions have crossed my mind:
Describe alternatives you've considered
Adding timestamps to the log messages themselves is of course functional, but rather inelegant.
( Okay, I'll admit that this issue is hardly a blocker, but ... elegance! 😅 . )
Thank you for your consideration, and this very useful library.
The text was updated successfully, but these errors were encountered: