15107: Clean up debug logs.
authorTom Clegg <tclegg@veritasgenetics.com>
Wed, 13 Nov 2019 21:34:58 +0000 (16:34 -0500)
committerTom Clegg <tclegg@veritasgenetics.com>
Wed, 13 Nov 2019 21:34:58 +0000 (16:34 -0500)
Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>

lib/controller/localdb/login.go

index 6d60adf146cac7779e2e9dd6ebfd2d8c17acc492..13ae366eb434bded6dd1a4dc034a7c843a5fe86d 100644 (file)
@@ -128,7 +128,7 @@ func (ctrl *googleLoginController) Login(ctx context.Context, cluster *arvados.C
 // Google API does not indicate one.
 func (ctrl *googleLoginController) getAuthInfo(ctx context.Context, cluster *arvados.Cluster, conf *oauth2.Config, token *oauth2.Token, idToken *oidc.IDToken) (*rpc.UserSessionAuthInfo, error) {
        var ret rpc.UserSessionAuthInfo
-       defer ctxlog.FromContext(ctx).Infof("ret: %#v", &ret) // debug
+       defer ctxlog.FromContext(ctx).WithField("ret", &ret).Debug("getAuthInfo returned")
 
        var claims struct {
                Name     string `json:"name"`
@@ -176,8 +176,6 @@ func (ctrl *googleLoginController) getAuthInfo(ctx context.Context, cluster *arv
                }
        }
 
-       ctxlog.FromContext(ctx).Infof("people/me response: %#v", person) // debug
-
        // The given/family names returned by the People API and
        // flagged as "primary" (if any) take precedence over the
        // split-by-whitespace result from above.
@@ -195,7 +193,7 @@ func (ctrl *googleLoginController) getAuthInfo(ctx context.Context, cluster *arv
        }
        for _, ea := range person.EmailAddresses {
                if ea.Metadata == nil || !ea.Metadata.Verified {
-                       ctxlog.FromContext(ctx).WithField("address", ea.Value).Debug("skipping unverified email address")
+                       ctxlog.FromContext(ctx).WithField("address", ea.Value).Info("skipping unverified email address")
                        continue
                }
                altEmails[ea.Value] = true