From 7ac683c36062f7d1dd8308bfce3b7f40d61548ba Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 21 Oct 2018 19:58:40 +0200 Subject: [PATCH] rclone: Inject debug logger for HTTP --- internal/backend/rclone/backend.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/backend/rclone/backend.go b/internal/backend/rclone/backend.go index 31426718e..f54625f94 100644 --- a/internal/backend/rclone/backend.go +++ b/internal/backend/rclone/backend.go @@ -210,7 +210,7 @@ func New(cfg Config, lim limiter.Limiter) (*Backend, error) { // send an HTTP request to the base URL, see if the server is there client := &http.Client{ - Transport: tr, + Transport: debug.RoundTripper(tr), Timeout: 60 * time.Second, } @@ -255,7 +255,7 @@ func Open(cfg Config, lim limiter.Limiter) (*Backend, error) { URL: url, } - restBackend, err := rest.Open(restConfig, be.tr) + restBackend, err := rest.Open(restConfig, debug.RoundTripper(be.tr)) if err != nil { return nil, err } @@ -283,7 +283,7 @@ func Create(cfg Config) (*Backend, error) { URL: url, } - restBackend, err := rest.Create(restConfig, be.tr) + restBackend, err := rest.Create(restConfig, debug.RoundTripper(be.tr)) if err != nil { _ = be.Close() return nil, err