From debf74df122baf8905bfc33eff06a2a81f2b5908 Mon Sep 17 00:00:00 2001 From: Murtaza Aliakbar Date: Wed, 13 Nov 2024 04:40:15 +0530 Subject: [PATCH] ipn/proxies: m verbose log --- intra/ipn/proxies.go | 9 ++++++--- intra/ipn/wgproxy.go | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/intra/ipn/proxies.go b/intra/ipn/proxies.go index e65f6e60..edc254bc 100644 --- a/intra/ipn/proxies.go +++ b/intra/ipn/proxies.go @@ -302,7 +302,7 @@ func (px *proxifier) RemoveProxy(id string) bool { // ProxyTo implements Proxies. // May return both a Proxy and an error, in which case, the error // denotes that while the Proxy is not healthy, it is still registered. -func (px *proxifier) ProxyTo(ipp netip.AddrPort, uid string, pids []string) (Proxy, error) { +func (px *proxifier) ProxyTo(ipp netip.AddrPort, uid string, pids []string) (_ Proxy, err error) { if len(pids) <= 0 || firstEmpty(pids) { return nil, errMissingProxyID } @@ -344,6 +344,11 @@ func (px *proxifier) ProxyTo(ipp netip.AddrPort, uid string, pids []string) (Pro loproxies = append(loproxies, lopinned) } + defer func() { + logev(err)("proxy: pin: %s+%s; miss: %v; notok: %v; noroute: %v; ended %v", + uid, ipp, missproxies, notokproxies, norouteproxies, endproxies) + }() + for _, pid := range pids { if pid == pinnedpid { // already tried above continue @@ -391,8 +396,6 @@ func (px *proxifier) ProxyTo(ipp netip.AddrPort, uid string, pids []string) (Pro missproxies = append(missproxies, pid) } - log.VV("proxy: pin: %s+%s; miss: %v; notok: %v; noroute: %v; ended %v", - uid, ipp, missproxies, notokproxies, norouteproxies, endproxies) return nil, errProxyAllDown } diff --git a/intra/ipn/wgproxy.go b/intra/ipn/wgproxy.go index 8c0b10d2..0af962fc 100644 --- a/intra/ipn/wgproxy.go +++ b/intra/ipn/wgproxy.go @@ -1184,5 +1184,5 @@ func logev(err error) log.LogFn { if err != nil { return log.E } - return log.V + return log.VV }