diff mbox series

[v4,07/23] log: Add a new log category for the console

Message ID 20240901222634.460873-8-sjg@chromium.org
State New
Delegated to: Tom Rini
Headers show
Series Fix various bugs | expand

Commit Message

Simon Glass Sept. 1, 2024, 10:26 p.m. UTC
Add a new category which covers the console, including the stdio
drivers.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v1)

 common/console.c | 2 ++
 common/log.c     | 1 +
 include/log.h    | 2 ++
 3 files changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/common/console.c b/common/console.c
index 52d6df8150f..0f00f3d8d5b 100644
--- a/common/console.c
+++ b/common/console.c
@@ -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>
diff --git a/common/log.c b/common/log.c
index dfee250b158..b83a6618900 100644
--- a/common/log.c
+++ b/common/log.c
@@ -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,
diff --git a/include/log.h b/include/log.h
index 69dcb339543..7c25bf0b081 100644
--- a/include/log.h
+++ b/include/log.h
@@ -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 */