lib: convert some debugf()s into traces

Use CURL_TRC_CF() for some useful tracing information instead of
DEBUGF().

Closes #14322
This commit is contained in:
Stefan Eissing 2024-07-31 11:36:08 +02:00 committed by Daniel Stenberg
parent a118a6ecdd
commit 02e0151a3a
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
2 changed files with 9 additions and 19 deletions

View File

@ -2542,19 +2542,10 @@ static CURLcode http2_data_pause(struct Curl_cfilter *cf,
drain_stream(cf, data, stream);
Curl_expire(data, 0, EXPIRE_RUN_NOW);
}
DEBUGF(infof(data, "Set HTTP/2 window size to %u for stream %u",
window, stream->id));
#ifdef DEBUGBUILD
{
/* read out the stream local window again */
uint32_t window2 = (uint32_t)
nghttp2_session_get_stream_local_window_size(ctx->h2,
stream->id);
DEBUGF(infof(data, "HTTP/2 window size is now %u for stream %u",
window2, stream->id));
}
#endif
CURL_TRC_CF(data, cf, "[%d] set window size to %u, local window now %u",
stream->id, window,
nghttp2_session_get_stream_local_window_size(ctx->h2,
stream->id));
}
#endif
return CURLE_OK;
@ -2791,11 +2782,11 @@ CURLcode Curl_http2_switch(struct Curl_easy *data,
CURLcode result;
DEBUGASSERT(!Curl_conn_is_http2(data, conn, sockindex));
DEBUGF(infof(data, "switching to HTTP/2"));
result = http2_cfilter_add(&cf, data, conn, sockindex, FALSE);
if(result)
return result;
CURL_TRC_CF(data, cf, "switching connection to HTTP/2");
conn->httpversion = 20; /* we know we are on HTTP/2 now */
conn->bits.multiplex = TRUE; /* at least potentially multiplexed */
@ -2842,12 +2833,12 @@ CURLcode Curl_http2_upgrade(struct Curl_easy *data,
CURLcode result;
DEBUGASSERT(!Curl_conn_is_http2(data, conn, sockindex));
DEBUGF(infof(data, "upgrading to HTTP/2"));
DEBUGASSERT(data->req.upgr101 == UPGR101_RECEIVED);
result = http2_cfilter_add(&cf, data, conn, sockindex, TRUE);
if(result)
return result;
CURL_TRC_CF(data, cf, "upgrading connection to HTTP/2");
DEBUGASSERT(cf->cft == &Curl_cft_nghttp2);
ctx = cf->ctx;

View File

@ -574,10 +574,9 @@ bool Curl_ssl_getsessionid(struct Curl_cfilter *cf,
}
}
DEBUGF(infof(data, "%s Session ID in cache for %s %s://%s:%d",
no_match? "Did not find": "Found",
Curl_ssl_cf_is_proxy(cf) ? "proxy" : "host",
cf->conn->handler->scheme, peer->hostname, peer->port));
CURL_TRC_CF(data, cf, "%s cached session ID for %s://%s:%d",
no_match? "No": "Found",
cf->conn->handler->scheme, peer->hostname, peer->port);
return no_match;
}