Skip to content

Commit

Permalink
Enable logging in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
romac committed May 15, 2024
1 parent 23af5fe commit 2c09723
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion code/actors/tests/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,21 @@ impl TestNode {
}
}

fn init_logging() {
use tracing_subscriber::util::SubscriberInitExt;
use tracing_subscriber::FmtSubscriber;

let builder = FmtSubscriber::builder()
.with_target(false)
.with_env_filter("malachite=trace")
.with_thread_ids(false);

let subscriber = builder.finish();
subscriber.init();
}

pub async fn run_test<const N: usize>(test: Test<N>) {
tracing_subscriber::fmt::init();
init_logging();

let mut handles = Vec::with_capacity(N);

Expand Down

0 comments on commit 2c09723

Please sign in to comment.