]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
tool_getparam: always disable "lib-ids" for tracing
authorDaniel Stenberg <daniel@haxx.se>
Thu, 2 Oct 2025 08:20:59 +0000 (10:20 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 2 Oct 2025 12:22:13 +0000 (14:22 +0200)
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

src/tool_cb_dbg.c
src/tool_getparam.c

index b454f5ca9badc8ccd430834df74ebc842d898a0b..d9aa1ff07a1fa051056b72a4ab7e9c16a9dd472f 100644 (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;
index 60b3b30ad48a07cc380321f139d438ad86fb2d57..0fdd6373e566c75d00a35c61b32dadaa6d978a63 100644 (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)