This repository was archived by the owner on Oct 11, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -18,11 +18,12 @@ import (
1818 "errors"
1919 "fmt"
2020 "io/ioutil"
21- "log"
2221 "net/http"
2322 neturl "net/url"
2423 "strings"
2524 "time"
25+
26+ "github.com/rancher/os/pkg/log"
2627)
2728
2829const (
@@ -120,22 +121,22 @@ func (h *HTTPClient) GetRetry(rawurl string) ([]byte, error) {
120121
121122 duration := h .InitialBackoff
122123 for retry := 1 ; retry <= h .MaxRetries ; retry ++ {
123- log .Printf ("Fetching data from %s. Attempt #%d" , dataURL , retry )
124+ log .Debugf ("Fetching data from %s. Attempt #%d" , dataURL , retry )
124125
125126 data , err := h .Get (dataURL )
126127 switch err .(type ) {
127128 case ErrNetwork :
128- log .Printf (err .Error ())
129+ log .Debugf (err .Error ())
129130 case ErrServer :
130- log .Printf (err .Error ())
131+ log .Debugf (err .Error ())
131132 case ErrNotFound :
132133 return data , err
133134 default :
134135 return data , err
135136 }
136137
137138 duration = ExpBackoff (duration , h .MaxBackoff )
138- log .Printf ("Sleeping for %v..." , duration )
139+ log .Debugf ("Sleeping for %v..." , duration )
139140 time .Sleep (duration )
140141 }
141142
You can’t perform that action at this time.
0 commit comments