Apply deprecate macro and LOG
[platform/core/uifw/dali-core.git] / dali / integration-api / debug.h
index 696b611..828aa3a 100644 (file)
@@ -1,24 +1,26 @@
 #ifndef __DALI_INTEGRATION_DEBUG_H__
 #define __DALI_INTEGRATION_DEBUG_H__
 
-//
-// Copyright (c) 2014 Samsung Electronics Co., Ltd.
-//
-// Licensed under the Flora License, Version 1.0 (the License);
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//     http://floralicense.org/license/
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an AS IS BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
 
 // EXTERNAL INCLUDES
 #include <string>
+#include <sstream>
 #include <list>
 
 // INTERNAL INCLUDES
@@ -43,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,
@@ -94,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
  */
@@ -255,7 +253,6 @@ public:
   static Filter *gElement;
   static Filter *gActor;
   static Filter *gShader;
-  static Filter *gDynamics;
 
 private:
   LogLevel mLoggingLevel;
@@ -350,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)
@@ -378,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)