@@ -68,8 +68,6 @@ type ServiceEndpointResolver struct {
6868 // indexed by service ID.
6969 endpoints map [string ]typesaws.ServiceEndpoint
7070 endpointOptions EndpointOptions
71-
72- logger logrus.FieldLogger
7371}
7472
7573// NewServiceEndpointResolver returns a new ServiceEndpointResolver.
@@ -81,7 +79,6 @@ func NewServiceEndpointResolver(opts EndpointOptions) *ServiceEndpointResolver {
8179 return & ServiceEndpointResolver {
8280 endpoints : endpointMap ,
8381 endpointOptions : opts ,
84- logger : logrus .StandardLogger (),
8582 }
8683}
8784
@@ -98,11 +95,9 @@ func (s *EC2EndpointResolver) ResolveEndpoint(ctx context.Context, params ec2.En
9895 // If custom endpoint not found, return default endpoint for the service.
9996 endpoint , ok := s .endpoints [ec2 .ServiceID ]
10097 if ! ok {
101- s .logger .Debug ("Custom EC2 endpoint not found, using default endpoint" )
10298 return ec2 .NewDefaultEndpointResolverV2 ().ResolveEndpoint (ctx , params )
10399 }
104100
105- s .logger .Debugf ("Custom EC2 endpoint found, using custom endpoint: %s" , endpoint .URL )
106101 params .Endpoint = aws .String (endpoint .URL )
107102 params .Region = aws .String (s .endpointOptions .Region )
108103 return ec2 .NewDefaultEndpointResolverV2 ().ResolveEndpoint (ctx , params )
@@ -121,11 +116,9 @@ func (s *IAMEndpointResolver) ResolveEndpoint(ctx context.Context, params iam.En
121116 // If custom endpoint not found, return default endpoint for the service.
122117 endpoint , ok := s .endpoints [iam .ServiceID ]
123118 if ! ok {
124- s .logger .Debug ("Custom IAM endpoint not found, using default endpoint" )
125119 return iam .NewDefaultEndpointResolverV2 ().ResolveEndpoint (ctx , params )
126120 }
127121
128- s .logger .Debugf ("Custom IAM endpoint found, using custom endpoint: %s" , endpoint .URL )
129122 params .Endpoint = aws .String (endpoint .URL )
130123 params .Region = aws .String (s .endpointOptions .Region )
131124 return iam .NewDefaultEndpointResolverV2 ().ResolveEndpoint (ctx , params )
@@ -144,11 +137,9 @@ func (s *STSEndpointResolver) ResolveEndpoint(ctx context.Context, params sts.En
144137 // If custom endpoint not found, return default endpoint for the service
145138 endpoint , ok := s .endpoints [sts .ServiceID ]
146139 if ! ok {
147- s .logger .Debug ("Custom STS endpoint not found, using default endpoint" )
148140 return sts .NewDefaultEndpointResolverV2 ().ResolveEndpoint (ctx , params )
149141 }
150142
151- s .logger .Debugf ("Custom STS endpoint found, using custom endpoint: %s" , endpoint .URL )
152143 params .Endpoint = aws .String (endpoint .URL )
153144 params .Region = aws .String (s .endpointOptions .Region )
154145 return sts .NewDefaultEndpointResolverV2 ().ResolveEndpoint (ctx , params )
@@ -167,11 +158,9 @@ func (s *Route53EndpointResolver) ResolveEndpoint(ctx context.Context, params ro
167158 // If custom endpoint not found, return default endpoint for the service.
168159 endpoint , ok := s .endpoints [route53 .ServiceID ]
169160 if ! ok {
170- s .logger .Debug ("Custom Route53 endpoint not found, using default endpoint" )
171161 return route53 .NewDefaultEndpointResolverV2 ().ResolveEndpoint (ctx , params )
172162 }
173163
174- s .logger .Debugf ("Custom Route53 endpoint found, using custom endpoint: %s" , endpoint .URL )
175164 params .Endpoint = aws .String (endpoint .URL )
176165 params .Region = aws .String (s .endpointOptions .Region )
177166 return route53 .NewDefaultEndpointResolverV2 ().ResolveEndpoint (ctx , params )
@@ -190,11 +179,9 @@ func (s *ServiceQuotasEndpointResolver) ResolveEndpoint(ctx context.Context, par
190179 // If custom endpoint not found, return default endpoint for the service.
191180 endpoint , ok := s .endpoints [servicequotas .ServiceID ]
192181 if ! ok {
193- s .logger .Debug ("Custom Service Quotas endpoint not found, using default endpoint" )
194182 return servicequotas .NewDefaultEndpointResolverV2 ().ResolveEndpoint (ctx , params )
195183 }
196184
197- s .logger .Debugf ("Custom Service Quotas endpoint found, using custom endpoint: %s" , endpoint .URL )
198185 params .Endpoint = aws .String (endpoint .URL )
199186 params .Region = aws .String (s .endpointOptions .Region )
200187 return servicequotas .NewDefaultEndpointResolverV2 ().ResolveEndpoint (ctx , params )
0 commit comments