| Message ID | 20260119113104.3560802-4-barnabas.pocze@ideasonboard.com |
|---|---|
| State | New |
| Headers | show |
| Series |
|
| Related | show |
Quoting Barnabás Pőcze (2026-01-19 11:31:01) > 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 <barnabas.pocze@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com> > --- > 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 6e6d2887c..da45b0d65 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(); > -- > 2.52.0 >
diff --git a/src/libcamera/base/log.cpp b/src/libcamera/base/log.cpp index 6e6d2887c..da45b0d65 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();
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 <barnabas.pocze@ideasonboard.com> --- src/libcamera/base/log.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)