diff --git a/eaudiofx/debug.h b/eaudiofx/debug.h index 953f69b..3a64769 100644 --- a/eaudiofx/debug.h +++ b/eaudiofx/debug.h @@ -14,16 +14,7 @@ namespace eaudiofx { int32_t getLogId(); }; -// TODO : Review this problem of multiple intanciation of "std::stringbuf sb" -#define EAUDIOFX_BASE(info,data) \ - do { \ - if (info <= etk::log::getLevel(eaudiofx::getLogId())) { \ - std::stringbuf sb; \ - std::ostream tmpStream(&sb); \ - tmpStream << data; \ - etk::log::logStream(eaudiofx::getLogId(), info, __LINE__, __class__, __func__, tmpStream); \ - } \ - } while(0) +#define EAUDIOFX_BASE(info,data) TK_LOG_BASE(eaudiofx::getLogId(),info,data) #define EAUDIOFX_CRITICAL(data) EAUDIOFX_BASE(1, data) #define EAUDIOFX_ERROR(data) EAUDIOFX_BASE(2, data) diff --git a/test/debug.h b/test/debug.h index 969e3a0..06c068e 100644 --- a/test/debug.h +++ b/test/debug.h @@ -14,16 +14,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)