diff --git a/enet/debug.h b/enet/debug.h index dd28f20..d32e95d 100644 --- a/enet/debug.h +++ b/enet/debug.h @@ -15,16 +15,7 @@ namespace enet { int32_t getLogId(); }; -// TODO : Review this problem of multiple intanciation of "std::stringbuf sb" -#define ENET_BASE(info,data) \ - do { \ - if (info <= etk::log::getLevel(enet::getLogId())) { \ - std::stringbuf sb; \ - std::ostream tmpStream(&sb); \ - tmpStream << data; \ - etk::log::logStream(enet::getLogId(), info, __LINE__, __class__, __func__, tmpStream); \ - } \ - } while(0) +#define ENET_BASE(info,data) TK_LOG_BASE(enet::getLogId(),info,data) #define ENET_CRITICAL(data) ENET_BASE(1, data) #define ENET_ERROR(data) ENET_BASE(2, data) diff --git a/test/debug.h b/test/debug.h index 0cab2cc..1ce0350 100644 --- a/test/debug.h +++ b/test/debug.h @@ -15,16 +15,7 @@ namespace appl { int32_t getLogId(); }; -// TODO : Review this problem of multiple intanciation of "std::stringbuf sb" -#define APPL_BASE(info,data) \ - do { \ - if (info <= etk::log::getLevel(appl::getLogId())) { \ - std::stringbuf sb; \ - std::ostream tmpStream(&sb); \ - tmpStream << data; \ - etk::log::logStream(appl::getLogId(), info, __LINE__, __class__, __func__, tmpStream); \ - } \ - } while(0) +#define APPL_BASE(info,data) TK_LOG_BASE(appl::getLogId(),info,data) #define APPL_CRITICAL(data) APPL_BASE(1, data) #define APPL_ERROR(data) APPL_BASE(2, data)