Skip to content

Commit 8b21f9e

Browse files
committed
write threads info into log only when debugging
1 parent c1d3610 commit 8b21f9e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

compiler/rustc_log/src/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ pub fn init_env_logger(env: &str) -> Result<(), Error> {
8383
.with_verbose_exit(verbose_entry_exit)
8484
.with_verbose_entry(verbose_entry_exit)
8585
.with_indent_amount(2);
86-
#[cfg(parallel_compiler)]
86+
#[cfg(all(parallel_compiler, debug_assertions))]
8787
let layer = layer.with_thread_ids(true).with_thread_names(true);
8888

8989
let subscriber = tracing_subscriber::Registry::default().with(filter).with(layer);

src/librustdoc/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ fn init_logging() {
203203
.with_verbose_exit(true)
204204
.with_verbose_entry(true)
205205
.with_indent_amount(2);
206-
#[cfg(parallel_compiler)]
206+
#[cfg(all(parallel_compiler, debug_assertions))]
207207
let layer = layer.with_thread_ids(true).with_thread_names(true);
208208

209209
use tracing_subscriber::layer::SubscriberExt;

0 commit comments

Comments
 (0)