]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-daemon: Clean up a debug message
authorMartin Schwenke <mschwenke@ddn.com>
Sun, 17 May 2026 06:15:44 +0000 (16:15 +1000)
committerMartin Schwenke <martins@samba.org>
Thu, 25 Jun 2026 22:32:30 +0000 (22:32 +0000)
This is annoyingly verbose when there are no arguments.  Drop the
location details and the "with arguments" noise. Arguments are now in
square brackets, when present.

Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Ralph Boehme <slow@samba.org>
ctdb/server/eventscript.c

index 325ea8ec92fc324a67e5955beb335e8788f62974..6409ab508ba17ab3912373ad6bab2f43dbac6e97 100644 (file)
@@ -642,9 +642,16 @@ int ctdb_event_script_run(struct ctdb_context *ctdb,
                return ret;
        }
 
-       DEBUG(DEBUG_INFO,
-             (__location__ " Running event %s with arguments %s\n",
-              ctdb_event_to_string(event), arg_str));
+       if (DEBUGLEVEL >= DBGLVL_INFO) {
+               if (arg_str == NULL || arg_str[0] == '\0') {
+                       D_INFO("Running event: %s\n",
+                              ctdb_event_to_string(event));
+               } else {
+                       D_INFO("Running event: %s [%s]\n",
+                              ctdb_event_to_string(event),
+                              arg_str);
+               }
+       }
 
        talloc_free(arg_str);
        return 0;