From 140dd0de85963956aba0fdf9234632533317cd2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Barnab=C3=A1s=20P=C5=91cze?= Date: Thu, 18 Dec 2025 18:45:00 +0100 Subject: [PATCH] libcamera: base: log: Do not check severity before printing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that the severity of the log message and the category is compared in the expansion of the `LOG()` macro, there is no need to do it again in the destructor. Signed-off-by: Barnabás Pőcze Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- src/libcamera/base/log.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/libcamera/base/log.cpp b/src/libcamera/base/log.cpp index 6e6d2887..da45b0d6 100644 --- a/src/libcamera/base/log.cpp +++ b/src/libcamera/base/log.cpp @@ -867,8 +867,7 @@ LogMessage::~LogMessage() msgStream_ << std::endl; - if (severity_ >= category_.severity()) - logger->write(*this); + logger->write(*this); if (severity_ == LogSeverity::LogFatal) { logger->backtrace();