diff options
| author | Yuki Okushi <jtitor@2k36.org> | 2023-04-06 07:18:30 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-04-06 07:18:30 +0900 |
| commit | 9dfe4af2a85a10d0ffdc991178a288c711fb94d4 (patch) | |
| tree | 50f34964dad0a3006236259dcfb3c38a7fb113e6 | |
| parent | 836504ec34f1f291a7cfe6fbe4374363defed7bd (diff) | |
| parent | 8b21f9ee22fa96a656bfcbf6f0a57120304d56a8 (diff) | |
| download | rust-9dfe4af2a85a10d0ffdc991178a288c711fb94d4.tar.gz rust-9dfe4af2a85a10d0ffdc991178a288c711fb94d4.zip | |
Rollup merge of #109926 - SparrowLii:parallel_log, r=eholk
write threads info into log only when debugging The current tracing log will unconditionally write thread information during parallel compilation, which sometimes confuses some normal output log information This fixes the UI test failure of: ``` [ui] tests/ui/consts/const_in_pattern/issue-73431.rs ``` Updates #75760
| -rw-r--r-- | compiler/rustc_log/src/lib.rs | 2 | ||||
| -rw-r--r-- | src/librustdoc/lib.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_log/src/lib.rs b/compiler/rustc_log/src/lib.rs index 22924efa948..21f6a404a01 100644 --- a/compiler/rustc_log/src/lib.rs +++ b/compiler/rustc_log/src/lib.rs @@ -83,7 +83,7 @@ pub fn init_env_logger(env: &str) -> Result<(), Error> { .with_verbose_exit(verbose_entry_exit) .with_verbose_entry(verbose_entry_exit) .with_indent_amount(2); - #[cfg(parallel_compiler)] + #[cfg(all(parallel_compiler, debug_assertions))] let layer = layer.with_thread_ids(true).with_thread_names(true); let subscriber = tracing_subscriber::Registry::default().with(filter).with(layer); diff --git a/src/librustdoc/lib.rs b/src/librustdoc/lib.rs index 4c4dbc9864f..79f53ee57cc 100644 --- a/src/librustdoc/lib.rs +++ b/src/librustdoc/lib.rs @@ -203,7 +203,7 @@ fn init_logging() { .with_verbose_exit(true) .with_verbose_entry(true) .with_indent_amount(2); - #[cfg(parallel_compiler)] + #[cfg(all(parallel_compiler, debug_assertions))] let layer = layer.with_thread_ids(true).with_thread_names(true); use tracing_subscriber::layer::SubscriberExt; |
