[libcamera-devel] [PATCH] libcamera: log: Expand log level names

Kieran Bingham kieran.bingham at ideasonboard.com
Tue Jan 14 02:26:26 CET 2020


When the log severity names were added, there was only 4 characters
reserved for their printing. When the FATAL level was added, this
increased to 5, and thus both DBG and ERR can be expanded to their full
spelling.

Signed-off-by: Kieran Bingham <kieran.bingham at ideasonboard.com>
---
 src/libcamera/log.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp
index f4eb8c11adc3..4fc4b5ce0d39 100644
--- a/src/libcamera/log.cpp
+++ b/src/libcamera/log.cpp
@@ -83,10 +83,10 @@ static int log_severity_to_syslog(LogSeverity severity)
 static const char *log_severity_name(LogSeverity severity)
 {
 	static const char *const names[] = {
-		"  DBG",
+		"DEBUG",
 		" INFO",
 		" WARN",
-		"  ERR",
+		"ERROR",
 		"FATAL",
 	};
 
-- 
2.20.1



More information about the libcamera-devel mailing list