@@ -23,7 +23,6 @@ import (
23
23
24
24
"time"
25
25
26
- "github.com/golang/glog"
27
26
"github.com/oracle/oci-go-sdk/common"
28
27
"github.com/oracle/oci-go-sdk/common/auth"
29
28
"github.com/pkg/errors"
@@ -88,7 +87,7 @@ func NewCloudProvider(config *Config) (cloudprovider.Interface, error) {
88
87
return nil , err
89
88
}
90
89
91
- rateLimiter := newRateLimiter (config .RateLimiter )
90
+ rateLimiter := newRateLimiter (logger . Sugar (), config .RateLimiter )
92
91
93
92
c , err := client .New (logger .Sugar (), cp , & rateLimiter )
94
93
if err != nil {
@@ -240,8 +239,7 @@ func buildConfigurationProvider(logger *zap.Logger, config *Config) (common.Conf
240
239
241
240
// newRateLimiter builds and returns a struct containing read and write
242
241
// rate limiters. Defaults are used where no (0) value is provided.
243
- func newRateLimiter (config * RateLimiterConfig ) client.RateLimiter {
244
-
242
+ func newRateLimiter (logger * zap.SugaredLogger , config * RateLimiterConfig ) client.RateLimiter {
245
243
if config == nil {
246
244
config = & RateLimiterConfig {}
247
245
}
@@ -269,11 +267,11 @@ func newRateLimiter(config *RateLimiterConfig) client.RateLimiter {
269
267
config .RateLimitBucketWrite ),
270
268
}
271
269
272
- glog . V ( 2 ) .Infof ("OCI using read rate limit configuration: QPS=%g, bucket=%d" ,
270
+ logger .Infof ("OCI using read rate limit configuration: QPS=%g, bucket=%d" ,
273
271
config .RateLimitQPSRead ,
274
272
config .RateLimitBucketRead )
275
273
276
- glog . V ( 2 ) .Infof ("OCI using write rate limit configuration: QPS=%g, bucket=%d" ,
274
+ logger .Infof ("OCI using write rate limit configuration: QPS=%g, bucket=%d" ,
277
275
config .RateLimitQPSWrite ,
278
276
config .RateLimitBucketWrite )
279
277
0 commit comments