diff --git a/command/agent/auth/alicloud/alicloud.go b/command/agent/auth/alicloud/alicloud.go index 680a1ddbabff..dbccdd57c396 100644 --- a/command/agent/auth/alicloud/alicloud.go +++ b/command/agent/auth/alicloud/alicloud.go @@ -207,7 +207,7 @@ func (a *alicloudMethod) pollForCreds(credProvider providers.Provider, frequency return case <-ticker.C: if err := a.checkCreds(credProvider); err != nil { - a.logger.Warn("unable to retrieve current creds, retaining last creds", err) + a.logger.Warn("unable to retrieve current creds, retaining last creds", "error", err) } } } diff --git a/command/agent/auth/aws/aws.go b/command/agent/auth/aws/aws.go index d3ea6007202d..f0a063541172 100644 --- a/command/agent/auth/aws/aws.go +++ b/command/agent/auth/aws/aws.go @@ -279,7 +279,7 @@ func (a *awsMethod) pollForCreds(accessKey, secretKey, sessionToken string, freq return case <-ticker.C: if err := a.checkCreds(accessKey, secretKey, sessionToken); err != nil { - a.logger.Warn("unable to retrieve current creds, retaining last creds", err) + a.logger.Warn("unable to retrieve current creds, retaining last creds", "error", err) } } }