Skip to content

Commit

Permalink
Enable thread names in debug logging only for parallel_compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 committed Nov 11, 2020
1 parent 9cf8a49 commit 6e9ed8b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_driver/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 6e9ed8b

Please sign in to comment.