[DEV] update Log interafce
This commit is contained in:
parent
a9ed10a8f0
commit
13d741b770
11
exml/debug.h
11
exml/debug.h
@ -14,16 +14,7 @@
|
|||||||
namespace exml {
|
namespace exml {
|
||||||
int32_t getLogId();
|
int32_t getLogId();
|
||||||
};
|
};
|
||||||
// TODO : Review this problem of multiple intanciation of "std::stringbuf sb"
|
#define EXML_BASE(info,data) TK_LOG_BASE(exml::getLogId(),info,data)
|
||||||
#define EXML_BASE(info,data) \
|
|
||||||
do { \
|
|
||||||
if (info <= etk::log::getLevel(exml::getLogId())) { \
|
|
||||||
std::stringbuf sb; \
|
|
||||||
std::ostream tmpStream(&sb); \
|
|
||||||
tmpStream << data; \
|
|
||||||
etk::log::logStream(exml::getLogId(), info, __LINE__, __class__, __func__, tmpStream); \
|
|
||||||
} \
|
|
||||||
} while(0)
|
|
||||||
|
|
||||||
#define EXML_CRITICAL(data) EXML_BASE(1, data)
|
#define EXML_CRITICAL(data) EXML_BASE(1, data)
|
||||||
#define EXML_ERROR(data) EXML_BASE(2, data)
|
#define EXML_ERROR(data) EXML_BASE(2, data)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user