[libcamera-devel] [PATCH] libcamera: log: Add a debug log level
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Wed Dec 19 00:21:22 CET 2018
Many of the message logged by the library will be debug messages, we
thus need a debug log level.
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
src/libcamera/include/log.h | 1 +
src/libcamera/log.cpp | 3 +++
2 files changed, 4 insertions(+)
diff --git a/src/libcamera/include/log.h b/src/libcamera/include/log.h
index 41f8a756bf0c..74439848c6ca 100644
--- a/src/libcamera/include/log.h
+++ b/src/libcamera/include/log.h
@@ -12,6 +12,7 @@
namespace libcamera {
enum LogSeverity {
+ LogDebug,
LogInfo,
LogWarning,
LogError,
diff --git a/src/libcamera/log.cpp b/src/libcamera/log.cpp
index 3715e69d810e..44b3a5bbe279 100644
--- a/src/libcamera/log.cpp
+++ b/src/libcamera/log.cpp
@@ -23,6 +23,8 @@ namespace libcamera {
/**
* \enum LogSeverity
* Log message severity
+ * \var LogDebug
+ * Debug message
* \var LogInfo
* Informational message
* \var LogWarning
@@ -43,6 +45,7 @@ namespace libcamera {
static const char *log_severity_name(LogSeverity severity)
{
static const char * const names[] = {
+ " DBG",
"INFO",
"WARN",
" ERR",
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list