log: Add a new log category for the console

Add a new category which covers the console, including the stdio
drivers.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2024-09-01 16:26:18 -06:00 committed by Tom Rini
parent 4048219957
commit 90afded462
3 changed files with 5 additions and 0 deletions

View file

@ -4,6 +4,8 @@
* Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it
*/ */
#define LOG_CATEGORY LOGC_CONSOLE
#include <console.h> #include <console.h>
#include <debug_uart.h> #include <debug_uart.h>
#include <display_options.h> #include <display_options.h>

View file

@ -31,6 +31,7 @@ static const char *const log_cat_name[] = {
"event", "event",
"fs", "fs",
"expo", "expo",
"console",
}; };
_Static_assert(ARRAY_SIZE(log_cat_name) == LOGC_COUNT - LOGC_NONE, _Static_assert(ARRAY_SIZE(log_cat_name) == LOGC_COUNT - LOGC_NONE,

View file

@ -104,6 +104,8 @@ enum log_category_t {
LOGC_FS, LOGC_FS,
/** @LOGC_EXPO: Related to expo handling */ /** @LOGC_EXPO: Related to expo handling */
LOGC_EXPO, LOGC_EXPO,
/** @LOGC_CONSOLE: Related to the console and stdio */
LOGC_CONSOLE,
/** @LOGC_COUNT: Number of log categories */ /** @LOGC_COUNT: Number of log categories */
LOGC_COUNT, LOGC_COUNT,
/** @LOGC_END: Sentinel value for lists of log categories */ /** @LOGC_END: Sentinel value for lists of log categories */