tor-chanmgr: don't log addresses so much.
We now log connection attempts at debug!, and mark relay target addresses as sensitive.
This commit is contained in:
parent
709543bb48
commit
920f7a3f53
|
@ -3476,6 +3476,7 @@ dependencies = [
|
|||
"itertools",
|
||||
"postage",
|
||||
"rand 0.8.5",
|
||||
"safelog",
|
||||
"serde",
|
||||
"thiserror",
|
||||
"tor-basic-utils",
|
||||
|
|
|
@ -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" }
|
||||
|
|
|
@ -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<R: Runtime>(
|
|||
.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<R: Runtime>(
|
|||
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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue