X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fintegration-api%2Fdebug.h;h=717c859daea1bcf4db9571800899f5ccc54fc192;hb=7cf931b2a8ab40cc1f673bc319e4cae5d801ce40;hp=ad0abd4bb826b9f877f10b88eb1c888a0e0a4f6a;hpb=cc26fc712e9f29058a6bd19015541a7d651c73d7;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/integration-api/debug.h b/dali/integration-api/debug.h old mode 100644 new mode 100755 index ad0abd4..717c859 --- 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 @@ -109,44 +111,44 @@ DALI_CORE_API void UninstallLogFunction(); /** * Provides unfiltered logging for global error level messages */ -#define DALI_LOG_ERROR(format, args...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugError, "%s " format, __PRETTY_FUNCTION__, ## args) +#define DALI_LOG_ERROR(format, ...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugError, "%s " format, __FUNCTION__, ## __VA_ARGS__) -#define DALI_LOG_ERROR_NOFN(format, args...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugError, format, ## args) +#define DALI_LOG_ERROR_NOFN(format, ...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugError, format, ## __VA_ARGS__) -#define DALI_LOG_WARNING_NOFN(format, args...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugWarning, format, ## args) +#define DALI_LOG_WARNING_NOFN(format, ...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugWarning, format, ## __VA_ARGS__) /** * Provides unfiltered logging for fps monitor */ -#define DALI_LOG_FPS(format, args...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, format, ## args) +#define DALI_LOG_FPS(format, ...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, format, ## __VA_ARGS__) /** * Provides unfiltered logging for update status */ -#define DALI_LOG_UPDATE_STATUS(format, args...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, format, ## args) +#define DALI_LOG_UPDATE_STATUS(format, ...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, format, ## __VA_ARGS__) /** * Provides unfiltered logging for render information */ -#define DALI_LOG_RENDER_INFO(format, args...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, format, ## args) +#define DALI_LOG_RENDER_INFO(format, ...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, format, ## __VA_ARGS__) /** * Provides unfiltered logging for release */ -#define DALI_LOG_RELEASE_INFO(format, args...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, format, ## args) +#define DALI_LOG_RELEASE_INFO(format, ...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, format, ## __VA_ARGS__) #ifdef DEBUG_ENABLED /** * Provides unfiltered logging for global warning level messages */ -#define DALI_LOG_WARNING(format, args...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugWarning, "%s " format, __PRETTY_FUNCTION__, ## args) +#define DALI_LOG_WARNING(format, ...) Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugWarning, "%s " format, __PRETTY_FUNCTION__, ## __VA_ARGS__) #else // DEBUG_ENABLED // Don't warn on release build -#define DALI_LOG_WARNING(format, args...) +#define DALI_LOG_WARNING(format, ...) #endif @@ -309,12 +311,21 @@ public: #ifdef DEBUG_ENABLED -#define DALI_LOG_INFO(filter, level, format, args...) \ - if(filter && filter->IsEnabledFor(level)) { filter->Log(level, format, ## args); } +#define DALI_LOG_INFO(filter, level, format, ...) \ + if(filter && filter->IsEnabledFor(level)) { filter->Log(level, format, ## __VA_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_INFO(filter, level, format, ...) +#define DALI_LOG_STREAM( filter, level, stream ) #endif // DEBUG_ENABLED @@ -342,8 +353,8 @@ public: }; -#define DALI_LOG_TRACE_METHOD_FMT(filter, format, args...) \ - Dali::Integration::Log::TraceObj debugTraceObj(filter, "%s: " format, __PRETTY_FUNCTION__, ## args) +#define DALI_LOG_TRACE_METHOD_FMT(filter, format, ...) \ + Dali::Integration::Log::TraceObj debugTraceObj(filter, "%s: " format, __PRETTY_FUNCTION__, ## __VA_ARGS__) #define DALI_LOG_TRACE_METHOD(filter) \ Dali::Integration::Log::TraceObj debugTraceObj(filter, __PRETTY_FUNCTION__) @@ -351,7 +362,7 @@ public: #else // DEBUG_ENABLED -#define DALI_LOG_TRACE_METHOD_FMT(filter, format, args...) +#define DALI_LOG_TRACE_METHOD_FMT(filter, format, ...) #define DALI_LOG_TRACE_METHOD(filter) @@ -395,7 +406,7 @@ public: \ /** * Allows one object to set another object's std::string easily */ -#define DALI_LOG_FMT_OBJECT_STRING(object, fmt, args...) (object->mDebugString = FormatToString(fmt, ## args)) +#define DALI_LOG_FMT_OBJECT_STRING(object, fmt, ...) (object->mDebugString = FormatToString(fmt, ## __VA_ARGS__)) /** * Allows one object to get another object's debug string @@ -418,7 +429,7 @@ public: \ #define DALI_LOG_OBJECT_STRING_DECLARATION #define DALI_LOG_ACTOR_TREE(node) #define DALI_LOG_SET_OBJECT_STRING(object, string) -#define DALI_LOG_FMT_OBJECT_STRING(object, fmt, args...) +#define DALI_LOG_FMT_OBJECT_STRING(object, fmt, ...) #define DALI_LOG_GET_OBJECT_STRING(object) #define DALI_LOG_GET_OBJECT_C_STR(object) "" #define DALI_LOG_OBJECT(filter, object)