File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ package ec2metadata
2
2
3
3
import (
4
4
"fmt"
5
+ "github.com/aws/aws-sdk-go/aws"
5
6
"net/http"
6
7
"sync/atomic"
7
8
"time"
@@ -65,7 +66,9 @@ func (t *tokenProvider) fetchTokenHandler(r *request.Request) {
65
66
switch requestFailureError .StatusCode () {
66
67
case http .StatusForbidden , http .StatusNotFound , http .StatusMethodNotAllowed :
67
68
atomic .StoreUint32 (& t .disabled , 1 )
68
- t .client .Config .Logger .Log (fmt .Sprintf ("WARN: failed to get session token, falling back to IMDSv1: %v" , requestFailureError ))
69
+ if t .client .Config .LogLevel .Matches (aws .LogDebugWithDeprecated ) {
70
+ t .client .Config .Logger .Log (fmt .Sprintf ("WARN: failed to get session token, falling back to IMDSv1: %v" , requestFailureError ))
71
+ }
69
72
case http .StatusBadRequest :
70
73
r .Error = requestFailureError
71
74
}
You can’t perform that action at this time.
0 commit comments