From 843104dad73bfdebb674d3c3ec82af225c20c493 Mon Sep 17 00:00:00 2001 From: Alex Auvolat Date: Tue, 16 Jan 2024 15:51:36 +0100 Subject: [PATCH] stun actor: add back log message to inform of autodiscovery result --- src/stun_actor.rs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/stun_actor.rs b/src/stun_actor.rs index 4cca4f1..bf4da73 100644 --- a/src/stun_actor.rs +++ b/src/stun_actor.rs @@ -120,6 +120,16 @@ impl StunAutodiscovery { address: discovered_addr, }; + let msg = format!( + "STUN autodiscovery result: {} -> {:?}", + self.consul_key, discovered_addr + ); + if self.last_result.as_ref().and_then(|x| x.address) != discovered_addr { + info!("{}", msg); + } else { + debug!("{}", msg); + } + consul .kv_put(&self.consul_key, serde_json::to_vec(¤t_result)?) .await?;