summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/xanzy/go-gitlab/client_options.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/xanzy/go-gitlab/client_options.go')
-rw-r--r--vendor/github.com/xanzy/go-gitlab/client_options.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/github.com/xanzy/go-gitlab/client_options.go b/vendor/github.com/xanzy/go-gitlab/client_options.go
index b09ae07817..9f740460a0 100644
--- a/vendor/github.com/xanzy/go-gitlab/client_options.go
+++ b/vendor/github.com/xanzy/go-gitlab/client_options.go
@@ -40,6 +40,14 @@ func WithCustomBackoff(backoff retryablehttp.Backoff) ClientOptionFunc {
}
}
+// WithCustomLogger can be used to configure a custom retryablehttp leveled logger
+func WithCustomLeveledLogger(leveledLogger retryablehttp.LeveledLogger) ClientOptionFunc {
+ return func(c *Client) error {
+ c.client.Logger = leveledLogger
+ return nil
+ }
+}
+
// WithCustomLimiter injects a custom rate limiter to the client.
func WithCustomLimiter(limiter RateLimiter) ClientOptionFunc {
return func(c *Client) error {
@@ -50,6 +58,14 @@ func WithCustomLimiter(limiter RateLimiter) ClientOptionFunc {
}
}
+// WithCustomLogger can be used to configure a custom retryablehttp logger
+func WithCustomLogger(logger retryablehttp.Logger) ClientOptionFunc {
+ return func(c *Client) error {
+ c.client.Logger = logger
+ return nil
+ }
+}
+
// WithCustomRetry can be used to configure a custom retry policy.
func WithCustomRetry(checkRetry retryablehttp.CheckRetry) ClientOptionFunc {
return func(c *Client) error {