mirror of https://github.com/astral-sh/ruff
## Summary [tracing](https://github.com/tokio-rs/tracing) is library for logging, tracing and related features that has a large ecosystem. Using [tracing-subscriber](https://docs.rs/tracing-subscriber) and [tracing-indicatif](https://github.com/emersonford/tracing-indicatif), we get a nice logging output that you can configure with `RUST_LOG` (e.g. `RUST_LOG=debug`) and a live look into the formatter progress. Default:  `RUST_LOG=debug`:  It's easy to see in this output which files take a disproportionate amount of time. [Peek 2023-07-30 14-35.webm](https://github.com/astral-sh/ruff/assets/6826232/2c92db5c-1354-465b-a6bc-ddfb281d6f9d) It opens up further integration with the tracing ecosystem, [tracing-timing](https://docs.rs/tracing-timing/latest/tracing_timing/) and [tokio-console](https://github.com/tokio-rs/console) can e.g. show histograms and the json output allows us building better pipelines than grepping a log file. One caveat is using `parent: None` for the logging statements because tracing subscriber does not allow deactivating the span without reimplementing all the other log message formatting, too, and we don't need span information, esp. since it would currently show the progress bar span. ## Test Plan n/a |
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||