]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
log: Add a new log category for the console
authorSimon Glass <sjg@chromium.org>
Sun, 1 Sep 2024 22:26:18 +0000 (16:26 -0600)
committerTom Rini <trini@konsulko.com>
Wed, 18 Sep 2024 19:00:59 +0000 (13:00 -0600)
Add a new category which covers the console, including the stdio
drivers.

Signed-off-by: Simon Glass <sjg@chromium.org>
common/console.c
common/log.c
include/log.h

index 85f627297edee803b9b21bb221b9312e8aa0f02e..09d4b51f675e286a47535440f370d90ccbb19e2f 100644 (file)
@@ -4,6 +4,8 @@
  * Paolo Scaffardi, AIRVENT SAM s.p.a - RIMINI(ITALY), arsenio@tin.it
  */
 
+#define LOG_CATEGORY   LOGC_CONSOLE
+
 #include <console.h>
 #include <debug_uart.h>
 #include <display_options.h>
index dfee250b158a77f6284de849953702ba8b5cf537..b83a661890019afb1cccd284e399e27807e6120f 100644 (file)
@@ -31,6 +31,7 @@ static const char *const log_cat_name[] = {
        "event",
        "fs",
        "expo",
+       "console",
 };
 
 _Static_assert(ARRAY_SIZE(log_cat_name) == LOGC_COUNT - LOGC_NONE,
index fc0d59844728323474120de5f74180932845dbc7..2b86c7da3d4aee073d6aef5753bf025e0d51a6ab 100644 (file)
@@ -104,6 +104,8 @@ enum log_category_t {
        LOGC_FS,
        /** @LOGC_EXPO: Related to expo handling */
        LOGC_EXPO,
+       /** @LOGC_CONSOLE: Related to the console and stdio */
+       LOGC_CONSOLE,
        /** @LOGC_COUNT: Number of log categories */
        LOGC_COUNT,
        /** @LOGC_END: Sentinel value for lists of log categories */