From patchwork Tue Dec 18 23:21:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 57 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8462E60B0C for ; Wed, 19 Dec 2018 00:20:34 +0100 (CET) Received: from avalon.bb.dnainternet.fi (dfj612ybrt5fhg77mgycy-3.rev.dnainternet.fi [IPv6:2001:14ba:21f5:5b00:2e86:4862:ef6a:2804]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 0883A549 for ; Wed, 19 Dec 2018 00:20:33 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1545175234; bh=Kn81YAEMVpkh5uhGnAWNPmNPQcupuxzDlDRqmYajMSg=; h=From:To:Subject:Date:From; b=p9lF5hzCSlE2ML5zMut+q18pdwNaC8eoZ0LhQMYAcTUSwhhg1f7R+gc6ujD4IEqrF khVsLAZhivUwp97NrMMJ0zaM7IRo9lZQ8FXmuJTgkqjAi69B0H1z7zxcevtTagWhIX yyQNYJnoITThg0bb2VtTGMw5vaA+84Dqov3RLPm4= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Wed, 19 Dec 2018 01:21:22 +0200 Message-Id: <20181218232122.29023-1-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.19.2 MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH] libcamera: log: Add a debug log level X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Dec 2018 23:20:34 -0000 Many of the message logged by the library will be debug messages, we thus need a debug log level. Signed-off-by: Laurent Pinchart --- 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",