Add example for millisecond since init
Log4J has this nice feature that part of the log record is the number of millisecond since the logger initialization. It makes for a very simple timer giving you an idea of how long the process has run. Would it be possible to get it in env_logger?
I suspect this could be implemented with a custom formatter (env_logger::Builder::format). Would you be willing to experiment with that to see what lessons could be learned in how well this works and generalizes?
We already have a custom formatter. But to obtain that result we would need to store in a OnceLock or similar the start, and accessing the OnceLock would add further contention.
Ok, sorry, we just found that we can do an Instant::now() and move the value inside the closure. So it's entirely doable. Maybe it would be interesting as an example.
Re-opening to track someone writing that example.