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 }