15#ifndef IOX2_BB_REPORTING_LOGGING_HPP
16#define IOX2_BB_REPORTING_LOGGING_HPP
44#define IOX2_LOG_INTERNAL(location, level, msg_stream) \
45 if (iox2::legacy::log::internal::is_log_level_active(level)) { \
46 iox2::legacy::log::LogStream(location, level).self() << msg_stream; \
63#define IOX2_LOG(level, msg_stream) \
64 IOX2_LOG_INTERNAL(iox2::bb::detail::SourceLocation::current(), iox2::legacy::log::LogLevel::level, msg_stream)
auto is_log_level_active(LogLevel log_level) noexcept -> bool
Convenience function for the IOX2_LOG_INTERNAL macro.
LogLevel
This enum defines the log levels used for logging.
static constexpr LogLevel MINIMAL_LOG_LEVEL
The minimal log level which will be compiled into the application. All log levels below this will be ...
static constexpr bool IGNORE_ACTIVE_LOG_LEVEL
If set to true, the IOX2_LOG macro will ignore the the configured log level and forward all messages ...
constexpr bool always_false_v
Helper value to bind a static_assert to a type.
void log(LogLevel log_level, const char *origin, const char *message)
Adds a log message to the logger.