helper/command: silent debug msg on command register/unregister 20/6220/2
authorAntonio Borneo <borneo.antonio@gmail.com>
Sat, 8 May 2021 09:02:12 +0000 (11:02 +0200)
committerAntonio Borneo <borneo.antonio@gmail.com>
Sat, 22 May 2021 09:10:37 +0000 (10:10 +0100)
Commit e216186fab59 ("helper/command: register full-name commands
in jim") and commit a7d68878e4ba ("helper/command: unregister
commands through their full-name") introduce a LOG_DEBUG() message
each for command registration and unregistration.
The messages above are quite noisy and pollute the log when
debug_level is 3 or higher.
They can be useful to debug the command registration logic, but
for the other debug activities on OpenOCD are just noisy.
Already commit a03ac1ba3087 ("helper/command: disable logging of
registered commands [RFC]") was merged to silent the first case
that is now back with additional logs.

Silent both log messages.
Use 'if (false)' to silent them, making easy to re-enable it when
or if someone needs it.

Change-Id: Id8a067e60e822d4ecbddcb036d081298f7e6181f
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/6220
Tested-by: jenkins
src/helper/command.c

index 3a931b5a746a183764303980506010547883c3c1..c3d2e95665b583056b28e847702ff57308bd413c 100644 (file)
@@ -343,7 +343,8 @@ static struct command *register_command(struct command_context *context,
                return NULL;
        }
 
-       LOG_DEBUG("registering '%s'...", full_name);
+       if (false) /* too noisy with debug_level 3 */
+               LOG_DEBUG("registering '%s'...", full_name);
        int retval = Jim_CreateCommand(context->interp, full_name,
                                jim_command_dispatch, c, command_free);
        if (retval != JIM_OK) {
@@ -441,7 +442,8 @@ int unregister_commands_match(struct command_context *cmd_ctx, const char *forma
                        Jim_DecrRefCount(interp, elem);
                        continue;
                }
-               LOG_DEBUG("delete command \"%s\"", name);
+               if (false) /* too noisy with debug_level 3 */
+                       LOG_DEBUG("delete command \"%s\"", name);
 #if JIM_VERSION >= 80
                Jim_DeleteCommand(interp, elem);
 #else

Linking to existing account procedure

If you already have an account and want to add another login method you MUST first sign in with your existing account and then change URL to read https://review.openocd.org/login/?link to get to this page again but this time it'll work for linking. Thank you.

SSH host keys fingerprints

1024 SHA256:YKx8b7u5ZWdcbp7/4AeXNaqElP49m6QrwfXaqQGJAOk gerrit-code-review@openocd.zylin.com (DSA)
384 SHA256:jHIbSQa4REvwCFG4cq5LBlBLxmxSqelQPem/EXIrxjk gerrit-code-review@openocd.org (ECDSA)
521 SHA256:UAOPYkU9Fjtcao0Ul/Rrlnj/OsQvt+pgdYSZ4jOYdgs gerrit-code-review@openocd.org (ECDSA)
256 SHA256:A13M5QlnozFOvTllybRZH6vm7iSt0XLxbA48yfc2yfY gerrit-code-review@openocd.org (ECDSA)
256 SHA256:spYMBqEYoAOtK7yZBrcwE8ZpYt6b68Cfh9yEVetvbXg gerrit-code-review@openocd.org (ED25519)
+--[ED25519 256]--+
|=..              |
|+o..   .         |
|*.o   . .        |
|+B . . .         |
|Bo. = o S        |
|Oo.+ + =         |
|oB=.* = . o      |
| =+=.+   + E     |
|. .=o   . o      |
+----[SHA256]-----+
2048 SHA256:0Onrb7/PHjpo6iVZ7xQX2riKN83FJ3KGU0TvI0TaFG4 gerrit-code-review@openocd.zylin.com (RSA)