Revert "[Tizen] Add screen and client rotation itself function"
[platform/core/uifw/dali-core.git] / dali / integration-api / debug.cpp
index b9b5044..3eda626 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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.
@@ -61,7 +61,7 @@ namespace Integration
 namespace Log
 {
 
-thread_local LogFunction gthreadLocalLogFunction = NULL;
+thread_local LogFunction gthreadLocalLogFunction = nullptr;
 
 /* Forward declarations */
 std::string FormatToString(const char *format, ...);
@@ -92,7 +92,7 @@ void InstallLogFunction(const LogFunction& logFunction)
 
 void UninstallLogFunction()
 {
-  gthreadLocalLogFunction = NULL;
+  gthreadLocalLogFunction = nullptr;
 }
 
 #ifdef DEBUG_ENABLED
@@ -101,11 +101,11 @@ void UninstallLogFunction()
 Filter* Filter::gRender     = Filter::New(Debug::Concise, false, "LOG_RENDER");
 Filter* Filter::gResource   = Filter::New(Debug::Concise, false, "LOG_RESOURCE");
 Filter* Filter::gGLResource = Filter::New(Debug::Concise, false, "LOG_GL_RESOURCE");
-Filter* Filter::gObject     = NULL;
+Filter* Filter::gObject     = nullptr;
 Filter* Filter::gImage      = Filter::New(Debug::Concise, false, "LOG_IMAGE");
 Filter* Filter::gModel      = Filter::New(Debug::Concise, false, "LOG_MODEL");
-Filter* Filter::gNode       = NULL;
-Filter* Filter::gElement    = NULL;
+Filter* Filter::gNode       = nullptr;
+Filter* Filter::gElement    = nullptr;
 Filter* Filter::gActor      = Filter::New(Debug::Concise, false, "LOG_ACTOR");
 Filter* Filter::gShader     = Filter::New(Debug::Concise, false, "LOG_SHADER");
 
@@ -169,6 +169,13 @@ void Filter::DisableGlobalTrace()
   }
 }
 
+void Filter::SetGlobalLogLevel( LogLevel level )
+{
+  for(FilterIter iter = GetActiveFilters()->begin(); iter != GetActiveFilters()->end(); iter++)
+  {
+    (*iter)->SetLogLevel( level );
+  }
+}
 
 void Filter::Log(LogLevel level, const char* format, ...)
 {
@@ -179,7 +186,7 @@ void Filter::Log(LogLevel level, const char* format, ...)
 
     if( mTraceEnabled )
     {
-      char *buffer = NULL;
+      char *buffer = nullptr;
       int numChars = asprintf( &buffer, "    %-*c %s", mNesting, ':', format );
       if( numChars >= 0 ) // No error
       {
@@ -226,7 +233,6 @@ TraceObj::~TraceObj()
 
 #endif // DEBUG_ENABLED
 
-
 std::string ArgListToString(const char *format, va_list args)
 {
   std::string str; // empty string