diff --git a/include/libcamera/base/log.h b/include/libcamera/base/log.h index cc50415e..0751387a 100644 --- a/include/libcamera/base/log.h +++ b/include/libcamera/base/log.h @@ -132,8 +132,9 @@ LogMessage _log(const LogCategory &category, LogSeverity severity, #ifndef NDEBUG #define ASSERT(condition) static_cast(({ \ if (!(condition)) \ - LOG(Fatal) << "assertion \"" #condition "\" failed in " \ - << __func__ << "()"; \ + _log(LogCategory::defaultCategory(), LogFatal).stream() \ + << "assertion \"" #condition "\" failed in " \ + << __func__ << "()"; \ })) #else #define ASSERT(condition) static_cast(false && (condition))