[DEV] update Log interafce

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

View File

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

View File

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