diff --git a/Cargo.lock b/Cargo.lock index 8df231f42..b0811bb52 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3476,6 +3476,7 @@ dependencies = [ "itertools", "postage", "rand 0.8.5", + "safelog", "serde", "thiserror", "tor-basic-utils", diff --git a/crates/tor-chanmgr/Cargo.toml b/crates/tor-chanmgr/Cargo.toml index f36e5a51e..ea894a8bc 100644 --- a/crates/tor-chanmgr/Cargo.toml +++ b/crates/tor-chanmgr/Cargo.toml @@ -12,7 +12,7 @@ categories = ["network-programming", "cryptography"] repository = "https://gitlab.torproject.org/tpo/core/arti.git/" [features] -testing = [ ] +testing = [] [dependencies] async-trait = "0.1.2" @@ -22,6 +22,7 @@ educe = "0.4.6" futures = "0.3.14" postage = { version = "0.5.0", default-features = false, features = ["futures-traits"] } rand = "0.8" +safelog = { path = "../safelog", version = "0.1.2" } serde = { version = "1.0.103", features = ["derive"] } thiserror = "1" tor-basic-utils = { path = "../tor-basic-utils", version = "0.3.3" } diff --git a/crates/tor-chanmgr/src/builder.rs b/crates/tor-chanmgr/src/builder.rs index 349092a8a..dcd5316ef 100644 --- a/crates/tor-chanmgr/src/builder.rs +++ b/crates/tor-chanmgr/src/builder.rs @@ -6,6 +6,7 @@ use std::sync::{Arc, Mutex}; use crate::{event::ChanMgrEventSender, Error}; +use safelog::sensitive as sv; use std::time::Duration; use tor_error::{bad_api_usage, internal}; use tor_linkspec::{HasAddrs, HasRelayIds, OwnedChanTarget}; @@ -94,7 +95,7 @@ async fn connect_to_one( .map(|(i, a)| { let delay = rt.sleep(CONNECTION_DELAY * i as u32); delay.then(move |_| { - tracing::info!("Connecting to {}", a); + tracing::debug!("Connecting to {}", a); rt.connect(a) .map_ok(move |stream| (stream, *a)) .map_err(move |e| (e, *a)) @@ -115,7 +116,7 @@ async fn connect_to_one( Err((e, a)) => { // We got a failure on one of the streams. Store the error. // TODO(eta): ideally we'd start the next connection attempt immediately. - tracing::warn!("Connection to {} failed: {}", a, e); + tracing::warn!("Connection to {} failed: {}", sv(a), e); errors.push((e, a)); } }