rclone: Inject debug logger for HTTP

This commit is contained in:
Alexander Neumann 2018-10-21 19:58:40 +02:00
parent 19fd0f101f
commit 7ac683c360
1 changed files with 3 additions and 3 deletions

View File

@ -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