-
Notifications
You must be signed in to change notification settings - Fork 31
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
Format and print time at which event has occurred #56
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@davidbarsky ready for your review.
@ten3roberts can you try this PR out and share your feedback? |
Looks nice and works on my end. Would it be possible to add the Perhaps the Uptime is a bit too precise Perhaps some padding between the timestamp and span duration, as they are now back to back. Thanks for your work |
|
@ten3roberts can you please tell me more about |
Wow, looks much better On wasm32-unknown-unknown The
|
So what would you like me to do? Make a feature flag in |
No, simply depending on time is enough, as the feature resolver will unify the wasm-bindgen feature which you add in the user crate |
Okay, got you. @davidbarsky do you have time to review this PR? |
Sorry for the delay in looking at this: I haven't been able to review it depth because my employer is doing layoffs this week and I wanted to get some of the things I was working on done and released. I'll give this a proper review in an hour. |
I've been thinking about how to test this. A test could use a dummy |
Made a test with an atomic counter which gets incremented each time its P.S. GitHub is lagging hard right now, for some reason it doesn't show the latest commit. |
No, but your test is better than the one I had in mind 😆 gonna let CI run its course and then merge it |
Looks like CI is done?.. |
Can I ask you to publish a new release with this PR? |
We're figuring out permissions and stuff. May take a bit with back and forth across a large timezone gap. |
A new version with this change has been published |
As discussed in #49, new
FormatTime
trait is introduced and implemented for a few basic scenarios:()
– do-nothing time formatter.Uptime
– almost a copy-pasta from tracing_subscriber. Changed nanos to micros.LocalDateTime
– current wall-clock time in the current timezone.UtcDateTime
– current wall-clock time in the UTC timezone.Here's an example of how it looks with
UtcDateTime
:Logs from `examples/basic.rs`
Closes #48. Supersedes #49.