diff --git a/src/xswiftbus/utils.h b/src/xswiftbus/utils.h index 730e87972..fe9b75663 100644 --- a/src/xswiftbus/utils.h +++ b/src/xswiftbus/utils.h @@ -43,11 +43,11 @@ namespace XSwiftBus //! Logger convenience macros //! @{ // *INDENT-OFF* -#define DEBUG_LOG(msg) XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::DebugMsg, msg) -#define DEBUG_LOG_C(msg, doLog) if (doLog) { XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::DebugMsg, msg); } -#define INFO_LOG(msg) XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::InfoMsg, msg) -#define WARNING_LOG(msg) XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::WarningMsg, msg) -#define ERROR_LOG(msg) XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::ErrorMsg, msg) +#define DEBUG_LOG(msg) (XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::DebugMsg, (msg))) +#define DEBUG_LOG_C(msg, doLog) ((doLog) ? XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::DebugMsg, (msg)) : static_cast(0)) +#define INFO_LOG(msg) (XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::InfoMsg, (msg))) +#define WARNING_LOG(msg) (XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::WarningMsg, (msg))) +#define ERROR_LOG(msg) (XSwiftBus::Logger::print(__FILE__, __LINE__, XSwiftBus::Logger::ErrorMsg, (msg))) // *INDENT-ON* //! @}