diff options
| author | Jubilee <workingjubilee@gmail.com> | 2025-06-13 20:59:14 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-13 20:59:14 -0700 |
| commit | 94dfe49e9af92b77cb6a8123a6fea60b8ea83062 (patch) | |
| tree | 8634f710fe9ede2bb4828e62eab194e4709486c0 /tests/codegen/integer-overflow.rs | |
| parent | d087f112b7d1323446c7b39a8b616aee7fa56b3d (diff) | |
| parent | 781baafbe4501e079489f76fdd6fb439252f467d (diff) | |
| download | rust-94dfe49e9af92b77cb6a8123a6fea60b8ea83062.tar.gz rust-94dfe49e9af92b77cb6a8123a6fea60b8ea83062.zip | |
Rollup merge of #140969 - Stypox:logger-layer, r=RalfJung,oli-obk
Allow initializing logger with additional tracing Layer
This PR adds functions to the `rustc_log` and `rustc_driver_impl` crates to allow initializing the logger with an additional `tracing_subscriber::Layer`. This will be used in Miri to save trace events to file using e.g. [`tracing-chrome`](https://github.com/thoren-d/tracing-chrome)'s or [`tracing-tracy`](https://github.com/nagisa/rust_tracy_client)'s `Layer`s.
Additional context on the choice of signature can be found in [this Zulip thread](https://rust-lang.zulipchat.com/#narrow/channel/131828-t-compiler/topic/Adding.20a.20dependency.20to.20Miri.20that.20depends.20on.20a.20rustc.20dep/near/515707776).
I re-exported `tracing_subscriber::{Layer, Registry};` from `rustc_log` so that `rustc_driver_impl` can use them in the function signature without depending on `tracing_subscriber` directly. I did this to avoid copy-pasting the dependency line with all of the enabled features from the `rustc_log` to the `rustc_driver_impl`'s Cargo.toml, which would have possibly led to redundancies and inconsistencies.
r? `@RalfJung`
Diffstat (limited to 'tests/codegen/integer-overflow.rs')
0 files changed, 0 insertions, 0 deletions
