[DEV] update Log interafce

This commit is contained in:
2015-03-25 21:14:12 +01:00
parent 13043536c2
commit 6622cd8237
3 changed files with 8 additions and 83 deletions

View File

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