[DEV] update Log interafce

This commit is contained in:
Edouard DUPIN 2015-03-25 21:14:12 +01:00
parent 5a108ecdac
commit b1ad254e0e
2 changed files with 2 additions and 20 deletions

View File

@ -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)

View File

@ -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)