diff --git a/Cargo.lock b/Cargo.lock index 72eef74e4..e040ac437 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1497,6 +1497,7 @@ dependencies = [ "serde_json", "tokio", "tokio-util", + "tracing-subscriber", "yerpc", ] diff --git a/Cargo.toml b/Cargo.toml index e5b2ac391..cba77f1f4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -104,6 +104,7 @@ tokio-util = "0.7.9" toml = "0.8" url = "2" uuid = { version = "1", features = ["serde", "v4"] } +tracing-subscriber = { version = "0.3", features = ["env-filter"] } # Pin OpenSSL to 3.1 releases. # OpenSSL 3.2 has a regression tracked at diff --git a/src/peer_channels.rs b/src/peer_channels.rs index af11cd826..a9cd57a1e 100644 --- a/src/peer_channels.rs +++ b/src/peer_channels.rs @@ -732,6 +732,18 @@ mod tests { #[tokio::test(flavor = "multi_thread", worker_threads = 2)] async fn test_parallel_connect() { + use tracing_subscriber::{prelude::*, EnvFilter}; + tracing_subscriber::registry() + .with(tracing_subscriber::fmt::layer().with_writer(std::io::stderr)) + // .with(DeltaLayer(ctx.clone())) + .with( + EnvFilter::builder() + .with_default_directive(tracing_subscriber::filter::LevelFilter::DEBUG.into()) + .from_env_lossy(), + ) + .try_init() + .ok(); + let mut tcm = TestContextManager::new(); let alice = &mut tcm.alice().await; let bob = &mut tcm.bob().await;