summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-12-19 01:20:26 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2018-12-19 14:11:25 +0200
commit907602eab5d6071e0b979807b697e1d3fd6ac6c3 (patch)
treed66a34ccb1eaae0532f5ec27cb129afd01a7e47e
parent3c8886d6981e1238657cc6ee9dcf267f090fca41 (diff)
libcamera: log: Add a debug log level
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@ideasonboard.com>
-rw-r--r--src/libcamera/include/log.h1
-rw-r--r--src/libcamera/log.cpp3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/libcamera/include/log.h b/src/libcamera/include/log.h
index 41f8a756..74439848 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 3715e69d..44b3a5bb 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",