From 613a7e130b24e5f5bd5825efcdd003be01ab598c Mon Sep 17 00:00:00 2001 From: Dominik Werder Date: Thu, 9 Nov 2023 13:10:19 +0100 Subject: [PATCH] Reduce log --- netfetch/src/ca/connset.rs | 2 +- netfetch/src/ca/finder.rs | 4 +++- netfetch/src/ca/findioc.rs | 4 ---- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/netfetch/src/ca/connset.rs b/netfetch/src/ca/connset.rs index bcd8559..52a5a6d 100644 --- a/netfetch/src/ca/connset.rs +++ b/netfetch/src/ca/connset.rs @@ -1283,7 +1283,7 @@ impl CaConnSet { Assigned(st4) => { if st4.updated + CHANNEL_HEALTH_TIMEOUT < tsnow { self.stats.channel_health_timeout().inc(); - debug!("health timeout channel {ch:?} ~~~~~~~~~~~~~~~~~~~"); + trace!("health timeout channel {ch:?} ~~~~~~~~~~~~~~~~~~~"); let addr = SocketAddr::V4(*addr_v4); cmd_remove_channel.push((addr, ch.clone())); if st.health_timeout_count < 3 { diff --git a/netfetch/src/ca/finder.rs b/netfetch/src/ca/finder.rs index 435a6ab..61eecc7 100644 --- a/netfetch/src/ca/finder.rs +++ b/netfetch/src/ca/finder.rs @@ -217,8 +217,10 @@ async fn finder_worker_single( items.extend(to_add.into_iter()); let items = items; for e in &items { - if true || crate::ca::connset::trigger.contains(&e.channel.as_str()) { + if crate::ca::connset::trigger.contains(&e.channel.as_str()) { debug!("found in database: {e:?}"); + } else { + trace!("found in database: {e:?}"); } } let items_len = items.len(); diff --git a/netfetch/src/ca/findioc.rs b/netfetch/src/ca/findioc.rs index 8cd63bb..0dc505b 100644 --- a/netfetch/src/ca/findioc.rs +++ b/netfetch/src/ca/findioc.rs @@ -368,9 +368,6 @@ impl FindIocStream { } } else { stats.ca_udp_first_msg_not_version().inc(); - // debug!("first message is not a version: {:?}", msgs[0].ty); - // Seems like a bug in many IOCs - //good = false; } let mut res = Vec::new(); if good { @@ -380,7 +377,6 @@ impl FindIocStream { let addr = SocketAddrV4::new(src_addr, k.tcp_port); res.push((SearchId(k.id), addr)); } - //CaMsgTy::VersionRes(13) => {} _ => { stats.ca_udp_error().inc(); warn!("try_read: unknown message received {:?}", msg.ty);