Macro hygiene.

This commit is contained in:
Mat Sutcliffe
2019-08-26 19:19:06 +01:00
committed by Klaus Basan
parent 531a443bc3
commit 05b3a6d56d

View File

@@ -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<void>(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*
//! @}