Apply deprecate macro and LOG
[platform/core/uifw/dali-core.git] / dali / integration-api / debug.h
index 9f523e6..828aa3a 100644 (file)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <string>
+#include <sstream>
 #include <list>
 
 // INTERNAL INCLUDES
@@ -44,12 +45,6 @@ namespace Integration
 namespace Log
 {
 
-// environment variable for enabling/disabling fps tracking
-#define DALI_ENV_FPS_TRACKING "DALI_FPS_TRACKING"
-
-// environment variable for enabling/disabling fps tracking
-#define DALI_ENV_UPDATE_STATUS_INTERVAL "DALI_UPDATE_STATUS_INTERVAL"
-
 enum DebugPriority
 {
   DebugInfo,
@@ -95,6 +90,8 @@ DALI_IMPORT_API void UninstallLogFunction();
 
 #define DALI_LOG_ERROR_NOFN(format, args...)     Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugError, format, ## args)
 
+#define DALI_LOG_WARNING_NOFN(format, args...)     Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugWarning, format, ## args)
+
 /**
  * Provides unfiltered logging for fps monitor
  */
@@ -256,7 +253,6 @@ public:
   static Filter *gElement;
   static Filter *gActor;
   static Filter *gShader;
-  static Filter *gDynamics;
 
 private:
   LogLevel mLoggingLevel;
@@ -351,6 +347,19 @@ public: \
   std::string mDebugString;
 
 /**
+ * Print all the actor tree names
+ **/
+#define DALI_LOG_ACTOR_TREE( node ) { \
+  std::stringstream branch; \
+  Node* tempNode = node; \
+  while( tempNode ) { \
+    branch << "<" << tempNode->mDebugString << ">::"; \
+    tempNode = tempNode->GetParent(); \
+  } \
+  DALI_LOG_ERROR_NOFN("Actor tree: %s\n", branch.str().c_str()); \
+}
+
+/**
  * Allows one object to set another object's debug string
  */
 #define DALI_LOG_SET_OBJECT_STRING(object, string) (object->mDebugString = string)
@@ -379,6 +388,7 @@ public: \
 #else // DEBUG_ENABLED
 
 #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_GET_OBJECT_STRING(object)