From 96492df022fe148400a3ef63e071a5f115538a50 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Wed, 16 Sep 2026 15:05:45 +0000 Subject: [PATCH] ipn/ipnlocal: log the profile's login name, not the method value The profile switch log lines passed cp.UserProfile().LoginName without calling it, so they printed "%!q(func() string=0x7ff7141cd060)" in place of the login name. Updates #cleanup Signed-off-by: Brad Fitzpatrick Change-Id: I4e6a8c0b2d5f7a9c1e3b5d7f9a1c3e5b7d9f1a3c --- ipn/ipnlocal/local.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ipn/ipnlocal/local.go b/ipn/ipnlocal/local.go index 86976579e..04e8de6e9 100644 --- a/ipn/ipnlocal/local.go +++ b/ipn/ipnlocal/local.go @@ -4853,16 +4853,16 @@ func (b *LocalBackend) switchToBestProfileLocked(reason string) { } case !switched: if err != nil { - b.logf("%s: an error occurred; staying on profile %q (%s): %v", reason, cp.UserProfile().LoginName, cp.ID(), err) + b.logf("%s: an error occurred; staying on profile %q (%s): %v", reason, cp.UserProfile().LoginName(), cp.ID(), err) } else { - b.logf("%s: staying on profile %q (%s)", reason, cp.UserProfile().LoginName, cp.ID()) + b.logf("%s: staying on profile %q (%s)", reason, cp.UserProfile().LoginName(), cp.ID()) } case cp.ID() == "": b.logf("%s: disconnecting Tailscale", reason) case background: - b.logf("%s: switching to background profile %q (%s)", reason, cp.UserProfile().LoginName, cp.ID()) + b.logf("%s: switching to background profile %q (%s)", reason, cp.UserProfile().LoginName(), cp.ID()) default: - b.logf("%s: switching to profile %q (%s)", reason, cp.UserProfile().LoginName, cp.ID()) + b.logf("%s: switching to profile %q (%s)", reason, cp.UserProfile().LoginName(), cp.ID()) } if !switched { return