Skip to content

Commit 05619cf

Browse files
committed
use Sprintf to format string
1 parent 976964f commit 05619cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

cmd/start.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ func ingest(ctx context.Context, bheUrl url.URL, bheClient *http.Client, in <-ch
220220
if response, err := bheClient.Do(req); err != nil {
221221
if rest.IsClosedConnectionErr(err) {
222222
// try again on force closed connection
223-
log.Error(err, "remote host force closed connection while requesting %s; attempt %d/%d; trying again", req.URL, retry+1, maxRetries)
223+
log.Error(err, fmt.Sprintf("remote host force closed connection while requesting %s; attempt %d/%d; trying again", req.URL, retry+1, maxRetries))
224224
rest.ExponentialBackoff(retry)
225225

226226
if retry == maxRetries-1 {
@@ -288,7 +288,7 @@ func do(bheClient *http.Client, req *http.Request) (*http.Response, error) {
288288
if res, err = bheClient.Do(req); err != nil {
289289
if rest.IsClosedConnectionErr(err) {
290290
// try again on force closed connections
291-
log.Error(err, "remote host force closed connection while requesting %s; attempt %d/%d; trying again", req.URL, retry+1, maxRetries)
291+
log.Error(err, fmt.Sprintf("remote host force closed connection while requesting %s; attempt %d/%d; trying again", req.URL, retry+1, maxRetries))
292292
rest.ExponentialBackoff(retry)
293293
continue
294294
}
@@ -298,7 +298,7 @@ func do(bheClient *http.Client, req *http.Request) (*http.Response, error) {
298298
if res.StatusCode >= http.StatusInternalServerError {
299299
// Internal server error, backoff and try again.
300300
serverError := fmt.Errorf("received server error %d while requesting %v", res.StatusCode, req.URL)
301-
log.Error(serverError, "attempt %d/%d; trying again", retry+1, maxRetries)
301+
log.Error(serverError, fmt.Sprintf("attempt %d/%d; trying again", retry+1, maxRetries))
302302

303303
rest.ExponentialBackoff(retry)
304304
continue

0 commit comments

Comments
 (0)