From 82670a7954dc6c8e9f38f0feb74495ef9817f1b2 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Wed, 25 Mar 2015 21:14:12 +0100 Subject: [PATCH] [DEV] update Log interafce --- ejson/debug.h | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/ejson/debug.h b/ejson/debug.h index b87f3f8..dbbf715 100644 --- a/ejson/debug.h +++ b/ejson/debug.h @@ -14,16 +14,7 @@ namespace ejson { int32_t getLogId(); }; -// TODO : Review this problem of multiple intanciation of "std::stringbuf sb" -#define JSON_BASE(info,data) \ - do { \ - if (info <= etk::log::getLevel(ejson::getLogId())) { \ - std::stringbuf sb; \ - std::ostream tmpStream(&sb); \ - tmpStream << data; \ - etk::log::logStream(ejson::getLogId(), info, __LINE__, __class__, __func__, tmpStream); \ - } \ - } while(0) +#define JSON_BASE(info,data) TK_LOG_BASE(ejson::getLogId(),info,data) #define JSON_CRITICAL(data) JSON_BASE(1, data) #define JSON_ERROR(data) JSON_BASE(2, data)