tool_getparam: always disable "lib-ids" for tracing

Since the tool code itself adds the ids (controlled with "ids"), getting
them (also) added by the library adds nothing good. Always disable the
lib-ids even when "--trace-config all" is selected.

Also: change "== Info:" into just "* " to reduce output redundancy.

Ref: #18755
Reported-by: Alice Lee Poetics
Closes #18805
This commit is contained in:
Daniel Stenberg 2025-10-02 10:20:59 +02:00
parent e49698925c
commit 7f0fd14d9f
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
2 changed files with 7 additions and 4 deletions

View file

@ -201,7 +201,7 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
switch(type) {
case CURLINFO_TEXT:
fprintf(output, "%s%s== Info: %.*s", timebuf, idsbuf, (int)size, data);
fprintf(output, "%s%s* %.*s", timebuf, idsbuf, (int)size, data);
FALLTHROUGH();
default: /* in case a new one is introduced to shock us */
return 0;

View file

@ -736,7 +736,10 @@ static CURLcode set_trace_config(const char *token)
if((len == 3) && curl_strnequal(name, "all", 3)) {
global->traceids = toggle;
global->tracetime = toggle;
result = curl_global_trace(token);
if(toggle)
result = curl_global_trace("all,-lib-ids");
else
result = curl_global_trace(token);
if(result)
goto out;
}
@ -747,8 +750,8 @@ static CURLcode set_trace_config(const char *token)
global->tracetime = toggle;
}
else {
char buffer[32];
msnprintf(buffer, sizeof(buffer), "%c%.*s", toggle ? '+' : '-',
char buffer[64];
msnprintf(buffer, sizeof(buffer), "%c%.*s,-lib-ids", toggle ? '+' : '-',
(int)len, name);
result = curl_global_trace(buffer);
if(result)