Feature Request
An implementation of FormatTime which uses tokio::time::Instant and counts up.
Crates
tracing-subscriber
Motivation
Useful for logging within simulators which pause and manipulate the time within tokio runtimes, such as turmoil. This would allow for printing out time while still having deterministic log outputs. This would also be useful to log out time-shift when testing communication between multiple cooperating paused runtimes, like how turmoil treats servers.
Proposal
Verbatim the same implementation of Uptime but uses tokio::time::Instant instead. I'm unsure if it should be behind a feature flag or not to ensure that we don't pull in all of tokio if someone doesn't need this particular formatter.
Alternatives
Include such a formatter in tokio instead. This would make it harder to discover.
Feature Request
An implementation of FormatTime which uses tokio::time::Instant and counts up.
Crates
tracing-subscriber
Motivation
Useful for logging within simulators which pause and manipulate the time within tokio runtimes, such as turmoil. This would allow for printing out time while still having deterministic log outputs. This would also be useful to log out time-shift when testing communication between multiple cooperating paused runtimes, like how turmoil treats servers.
Proposal
Verbatim the same implementation of Uptime but uses tokio::time::Instant instead. I'm unsure if it should be behind a feature flag or not to ensure that we don't pull in all of tokio if someone doesn't need this particular formatter.
Alternatives
Include such a formatter in tokio instead. This would make it harder to discover.