configure.ac: Replace --enable-verbose-usb-comms with a new runtime log level.

--enable-verbose actually did the same as --enable-verbose-usb-comms,
so the new code replaces it too.

Change-Id: I1d1ddd5d681009663e0c52a75ad76fe71dbc172a
Signed-off-by: R. Diez <rdiez-2006@rd10.de>
Reviewed-on: https://review.openocd.org/c/openocd/+/9281
Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
Tested-by: jenkins
Reviewed-by: Marc Schink <dev@zapb.de>
This commit is contained in:
R. Diez
2025-12-01 19:09:42 +01:00
committed by Antonio Borneo
parent 50fdce21a0
commit ea9afa9e3e
9 changed files with 58 additions and 110 deletions
+4 -3
View File
@@ -53,13 +53,14 @@ static int64_t last_time;
static int64_t start;
static const char * const log_strings[6] = {
static const char * const log_strings[7] = {
"User : ",
"Error: ",
"Warn : ", /* want a space after each colon, all same width, colons aligned */
"Info : ",
"Debug: ",
"Debug: "
"Debug: ",
"Debug: ", /* corresponds to LOG_LVL_DEBUG_USB */
};
static int count;
@@ -212,7 +213,7 @@ COMMAND_HANDLER(handle_debug_level_command)
} else if (CMD_ARGC == 1) {
int new_level;
COMMAND_PARSE_NUMBER(int, CMD_ARGV[0], new_level);
if ((new_level > LOG_LVL_DEBUG_IO) || (new_level < LOG_LVL_SILENT)) {
if (new_level > LOG_LVL_DEBUG_USB || new_level < LOG_LVL_SILENT) {
command_print(CMD, "level must be between %d and %d", LOG_LVL_SILENT, LOG_LVL_DEBUG_IO);
return ERROR_COMMAND_ARGUMENT_INVALID;
}