From e8635c337dea38710eec1e9b6fdf4ebc208fd678 Mon Sep 17 00:00:00 2001 From: David Steele Date: Thu, 14 Jun 2018 17:54:43 +0100 Subject: [PATCH] Added DEBUG_LOG_STREAM for using stream operator Change-Id: I7864dd73c6b313b41b9b9ba7aab20e94cb262d55 --- dali/integration-api/debug.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dali/integration-api/debug.h b/dali/integration-api/debug.h index ad0abd4..309649b 100644 --- a/dali/integration-api/debug.h +++ b/dali/integration-api/debug.h @@ -21,8 +21,10 @@ // EXTERNAL INCLUDES #include #include +#include #include #include + #include #include @@ -312,9 +314,18 @@ public: #define DALI_LOG_INFO(filter, level, format, args...) \ if(filter && filter->IsEnabledFor(level)) { filter->Log(level, format, ## args); } +#define DALI_LOG_STREAM( filter, level, stream ) \ + if(filter && filter->IsEnabledFor(level)) \ + { \ + std::ostringstream o; \ + o << stream << std::endl; \ + filter->Log(level, "%s", o.str().c_str()); \ + } + #else // DEBUG_ENABLED #define DALI_LOG_INFO(filter, level, format, args...) +#define DALI_LOG_STREAM( filter, level, stream ) #endif // DEBUG_ENABLED -- 2.7.4