From 82f2fdc194df66aa027e627f43c1be72ee451e29 Mon Sep 17 00:00:00 2001 From: Brad Fitzpatrick Date: Tue, 13 Oct 2020 15:03:56 -0700 Subject: [PATCH] control/controlclient: adjust some logging point names The previous code read too explicitly like log.Printf("I am here1"), log.Printf("I am here2"). It still is with this change, but prettier, and less subject to code rearranging order. --- control/controlclient/auto.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/control/controlclient/auto.go b/control/controlclient/auto.go index 09cad3b5f..768418d5d 100644 --- a/control/controlclient/auto.go +++ b/control/controlclient/auto.go @@ -288,7 +288,7 @@ func (c *Client) authRoutine() { // don't send status updates for context errors, // since context cancelation is always on purpose. if ctx.Err() == nil { - c.sendStatus("authRoutine1", err, "", nil) + c.sendStatus("authRoutine-report", err, "", nil) } } @@ -353,7 +353,7 @@ func (c *Client) authRoutine() { c.synced = false c.mu.Unlock() - c.sendStatus("authRoutine2", nil, "", nil) + c.sendStatus("authRoutine-wantout", nil, "", nil) bo.BackOff(ctx, nil) } else { // ie. goal.wantLoggedIn c.mu.Lock() @@ -394,7 +394,7 @@ func (c *Client) authRoutine() { c.synced = false c.mu.Unlock() - c.sendStatus("authRoutine3", err, url, nil) + c.sendStatus("authRoutine-url", err, url, nil) bo.BackOff(ctx, err) continue } @@ -406,7 +406,7 @@ func (c *Client) authRoutine() { c.state = StateAuthenticated c.mu.Unlock() - c.sendStatus("authRoutine4", nil, "", nil) + c.sendStatus("authRoutine-success", nil, "", nil) c.cancelMapSafely() bo.BackOff(ctx, nil) } @@ -528,7 +528,7 @@ func (c *Client) mapRoutine() { c.logf("mapRoutine: netmap received: %s", state) if stillAuthed { - c.sendStatus("mapRoutine2", nil, "", nm) + c.sendStatus("mapRoutine-got-netmap", nil, "", nm) } })