diff options
| author | Joshua Nelson <jyn514@gmail.com> | 2020-11-11 13:28:30 -0500 |
|---|---|---|
| committer | Joshua Nelson <jyn514@gmail.com> | 2020-11-11 13:28:30 -0500 |
| commit | 6e9ed8b486876d6ac4a57342315eeba839f73eca (patch) | |
| tree | 79672049aa789b6d299a5ac297ed558b53979b7d | |
| parent | 9cf8a49f5d9c06cf6c559f25520c7a0f97047d00 (diff) | |
| download | rust-6e9ed8b486876d6ac4a57342315eeba839f73eca.tar.gz rust-6e9ed8b486876d6ac4a57342315eeba839f73eca.zip | |
Enable thread names in debug logging only for `parallel_compiler`
| -rw-r--r-- | compiler/rustc_driver/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_driver/src/lib.rs b/compiler/rustc_driver/src/lib.rs index 22fe1cf319a..a192c2eb94e 100644 --- a/compiler/rustc_driver/src/lib.rs +++ b/compiler/rustc_driver/src/lib.rs @@ -1292,6 +1292,8 @@ pub fn init_env_logger(env: &str) { .with_verbose_exit(true) .with_verbose_entry(true) .with_indent_amount(2); + #[cfg(parallel_compiler)] + let layer = layer.with_thread_ids(true).with_thread_names(true); use tracing_subscriber::layer::SubscriberExt; let subscriber = tracing_subscriber::Registry::default().with(filter).with(layer); |
