From 52cc7c80366cae2dfea1697f481b9a1eee8d7bf0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20L=C3=B6nnhager?= Date: Mon, 11 Sep 2023 21:19:17 +0200 Subject: [PATCH] Log only interface index for default routes --- talpid-routing/src/unix/macos/mod.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/talpid-routing/src/unix/macos/mod.rs b/talpid-routing/src/unix/macos/mod.rs index d4c2c46641d7..5397f2c35c94 100644 --- a/talpid-routing/src/unix/macos/mod.rs +++ b/talpid-routing/src/unix/macos/mod.rs @@ -387,7 +387,14 @@ impl RouteManagerImpl { let old_route = std::mem::replace(default_route, best_route); - log::debug!("New default route ({family:?}): {old_route:?} -> {default_route:?}"); + log::debug!( + "Default route change ({family:?}): interface {} -> {}", + old_route.map(|r| r.interface_index()).unwrap_or(0), + default_route + .as_ref() + .map(|r| r.interface_index()) + .unwrap_or(0), + ); // Notify default route listeners let event = match (family, default_route.is_some()) {