From 2c0972357bcc523e88453e76cedd0c0b47866018 Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Wed, 15 May 2024 18:31:58 +0200 Subject: [PATCH] Enable logging in tests --- code/actors/tests/util.rs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/code/actors/tests/util.rs b/code/actors/tests/util.rs index 22b391a2c..876b46d25 100644 --- a/code/actors/tests/util.rs +++ b/code/actors/tests/util.rs @@ -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(test: Test) { - tracing_subscriber::fmt::init(); + init_logging(); let mut handles = Vec::with_capacity(N);