forked from TrueCloudLab/restic
rclone: Inject debug logger for HTTP
This commit is contained in:
parent
19fd0f101f
commit
7ac683c360
1 changed files with 3 additions and 3 deletions
|
@ -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
|
// send an HTTP request to the base URL, see if the server is there
|
||||||
client := &http.Client{
|
client := &http.Client{
|
||||||
Transport: tr,
|
Transport: debug.RoundTripper(tr),
|
||||||
Timeout: 60 * time.Second,
|
Timeout: 60 * time.Second,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -255,7 +255,7 @@ func Open(cfg Config, lim limiter.Limiter) (*Backend, error) {
|
||||||
URL: url,
|
URL: url,
|
||||||
}
|
}
|
||||||
|
|
||||||
restBackend, err := rest.Open(restConfig, be.tr)
|
restBackend, err := rest.Open(restConfig, debug.RoundTripper(be.tr))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -283,7 +283,7 @@ func Create(cfg Config) (*Backend, error) {
|
||||||
URL: url,
|
URL: url,
|
||||||
}
|
}
|
||||||
|
|
||||||
restBackend, err := rest.Create(restConfig, be.tr)
|
restBackend, err := rest.Create(restConfig, debug.RoundTripper(be.tr))
|
||||||
if err != nil {
|
if err != nil {
|
||||||
_ = be.Close()
|
_ = be.Close()
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in a new issue