[v2,0/5] libcamera: base: log: Do not instantiate disabled `LogMessage`s
mbox series

Message ID 20260119113104.3560802-1-barnabas.pocze@ideasonboard.com
Headers show
Series
  • libcamera: base: log: Do not instantiate disabled `LogMessage`s
Related show

Message

Barnabás Pőcze Jan. 19, 2026, 11:30 a.m. UTC
The main goal of this series is to avoid the construction of `LogMessage`s
that in the end will not be printed and just discarded.

changes in v2:
  * remove the unnecessary log level checks in:
    * ~LogMessage()
    * ASSERT()

v1: https://patchwork.libcamera.org/cover/22909/

Barnabás Pőcze (5):
  treewide: Remove `libcamera::LOG(...)` occurrences
  libcamera: base: log: Do not instantiate disabled `LogMessage`s
  libcamera: base: log: Do not check severity before printing
  libcamera: base: log: Remove `LogInvalid` check
  libcamera: base: log: Inline `LOG()` into `ASSERT()`

 include/libcamera/base/log.h               | 17 ++++++++++++-----
 src/libcamera/base/log.cpp                 |  7 +------
 src/libcamera/sensor/camera_sensor_raw.cpp |  8 +++++---
 src/libcamera/v4l2_device.cpp              | 10 ++++++----
 4 files changed, 24 insertions(+), 18 deletions(-)

--
2.52.0