From 5593c0aa1ca4ad2ac3149fe6b8c13c76c531214c Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Wed, 18 Sep 2024 10:11:36 -0400 Subject: [PATCH] chore(connlib): log IPs assigned by stub resolver (#6752) This only happens once for each domain, so logging this on DEBUG should be fine. It is disabled by default and shouldn't be too spammy during development. --- rust/connlib/tunnel/src/dns.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rust/connlib/tunnel/src/dns.rs b/rust/connlib/tunnel/src/dns.rs index 0b234af3f..8f40b518b 100644 --- a/rust/connlib/tunnel/src/dns.rs +++ b/rust/connlib/tunnel/src/dns.rs @@ -150,10 +150,11 @@ impl StubResolver { .fqdn_to_ips .entry(fqdn.clone()) .or_insert_with(|| { - // TODO: the side effeccts are executed even if this is not inserted - // make it so that's not the case let mut ips = self.ip_provider.get_n_ipv4(4); ips.extend_from_slice(&self.ip_provider.get_n_ipv6(4)); + + tracing::debug!(domain = %fqdn, ?ips, "Assigning proxy IPs"); + ips }) .clone();