[DEV] update Log interafce

This commit is contained in:
Edouard DUPIN 2015-03-25 21:14:12 +01:00
parent f2a9ffcdb2
commit af62bc418a

View File

@ -30,16 +30,7 @@
namespace draw {
int32_t getLogId();
};
// TODO : Review this problem of multiple intanciation of "std::stringbuf sb"
#define DRAW_BASE(info,data) \
do { \
if (info <= etk::log::getLevel(draw::getLogId())) { \
std::stringbuf sb; \
std::ostream tmpStream(&sb); \
tmpStream << data; \
etk::log::logStream(draw::getLogId(), info, __LINE__, __class__, __func__, tmpStream); \
} \
} while(0)
#define DRAW_BASE(info,data) TK_LOG_BASE(draw::getLogId(),info,data)
#define DRAW_CRITICAL(data) DRAW_BASE(1, data)
#define DRAW_ERROR(data) DRAW_BASE(2, data)