Open dabreegster opened 4 years ago
Idea: Write two temporary log files, containing notes from info!
, warn!
, etc and the other with the Timer
hierarchial progress bar. Use something like multitail to display both. This only makes sense for batch scripts like the importer.
Assuming we use a separate binary like multitail, import.sh
can run the importer in the background and then launch multitail. This can be optional / autodetect multitail and fall back to the current behavior.
For redirecting logs to a file, many heavier-weight options, like
There can be a new constructor for Timer
to optionally log to a file.
Related to importer management: https://github.com/Nukesor/pueue
The more I look at it, the more tracing seems like the ecosystem I'm looking for -- see https://crates.io/crates/tracing-timing for example. But in the short term, I need something like Timer
in another project, so I'm going to try copying over and simplifying it there, and trying to integrate with indicatif
a bit.
abstutil::Timer
could probably be partly replaced.