Change DebugPriority name and Debug priority 12/285612/3
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 15 Dec 2022 09:11:11 +0000 (18:11 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Mon, 19 Dec 2022 00:16:40 +0000 (09:16 +0900)
Change-Id: Id902e7103cf19c156386eca4d941b16d361459d3

16 files changed:
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-application.cpp
automated-tests/src/dali-adaptor/dali-test-suite-utils/test-graphics-application.cpp
dali/internal/accessibility/bridge/accessibility-common.h
dali/internal/adaptor/common/combined-update-render-controller-debug.h
dali/internal/graphics/gles/egl-implementation.cpp
dali/internal/graphics/gles/gl-proxy-implementation.cpp
dali/internal/imaging/common/loader-png.cpp
dali/internal/network/common/network-performance-server.cpp
dali/internal/system/android/logging-android.cpp
dali/internal/system/common/object-profiler.cpp
dali/internal/system/common/performance-server.cpp
dali/internal/system/common/system-trace.cpp
dali/internal/system/tizen-wayland/logging-tizen.cpp
dali/internal/system/ubuntu-x11/logging-x.cpp
dali/internal/system/windows/logging-win.cpp
dali/internal/trace/tizen/trace-manager-impl-tizen.cpp

index 873b7b3..e4c6078 100644 (file)
@@ -117,13 +117,16 @@ void TestApplication::LogMessage(Dali::Integration::Log::DebugPriority level, st
   {
     switch(level)
     {
-      case Dali::Integration::Log::DebugInfo:
+      case Dali::Integration::Log::DEBUG:
+        fprintf(stderr, "DEBUG: %s", message.c_str());
+        break;
+      case Dali::Integration::Log::INFO:
         fprintf(stderr, "INFO: %s", message.c_str());
         break;
-      case Dali::Integration::Log::DebugWarning:
+      case Dali::Integration::Log::WARNING:
         fprintf(stderr, "WARN: %s", message.c_str());
         break;
-      case Dali::Integration::Log::DebugError:
+      case Dali::Integration::Log::ERROR:
         fprintf(stderr, "ERROR: %s", message.c_str());
         break;
       default:
index 0c6996e..0ad4763 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -120,13 +120,16 @@ void TestGraphicsApplication::LogMessage(Dali::Integration::Log::DebugPriority l
   {
     switch(level)
     {
-      case Dali::Integration::Log::DebugInfo:
+      case Dali::Integration::Log::DEBUG:
+        fprintf(stderr, "DEBUG: %s", message.c_str());
+        break;
+      case Dali::Integration::Log::INFO:
         fprintf(stderr, "INFO: %s", message.c_str());
         break;
-      case Dali::Integration::Log::DebugWarning:
+      case Dali::Integration::Log::WARNING:
         fprintf(stderr, "WARN: %s", message.c_str());
         break;
-      case Dali::Integration::Log::DebugError:
+      case Dali::Integration::Log::ERROR:
         fprintf(stderr, "ERROR: %s", message.c_str());
         break;
       default:
index 29231c8..6f01428 100644 (file)
@@ -82,7 +82,6 @@ enum class SortOrder : uint32_t
 
 namespace DBus
 {
-
 /**
  * @brief The CurrentBridgePtr class is to save the current Accessibility Bridge.
  */
@@ -117,7 +116,6 @@ public:
   }
 }; // CurrentBridgePtr
 
-
 // Templates for setting and getting Accessible values
 namespace detail
 {
@@ -258,7 +256,7 @@ struct _Logger
 
   ~_Logger()
   {
-    Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, "%s:%d: %s", mFile, mLine, mTmp.str().c_str());
+    Dali::Integration::Log::LogMessage(Dali::Integration::Log::INFO, "%s:%d: %s", mFile, mLine, mTmp.str().c_str());
   }
 
   template<typename T>
@@ -287,12 +285,12 @@ struct _LoggerScope
   : mFile(file),
     mLine(line)
   {
-    Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, "%s:%d: +", mFile, mLine);
+    Dali::Integration::Log::LogMessage(Dali::Integration::Log::INFO, "%s:%d: +", mFile, mLine);
   }
 
   ~_LoggerScope()
   {
-    Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, "%s:%d: -", mFile, mLine);
+    Dali::Integration::Log::LogMessage(Dali::Integration::Log::INFO, "%s:%d: -", mFile, mLine);
   }
 };
 
index 8a2a150..0a0cfe4 100644 (file)
@@ -75,13 +75,13 @@ Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_THR
 #define DEBUG_LEVEL_EVENT 0
 
 #define LOG_THREAD_SYNC(level, color, format, ...) \
-  Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, "%s" format "%s\n", color, ##__VA_ARGS__, COLOR_CLEAR)
+  Dali::Integration::Log::LogMessage(Dali::Integration::Log::INFO, "%s" format "%s\n", color, ##__VA_ARGS__, COLOR_CLEAR)
 
 #define LOG_THREAD_SYNC_TRACE(color) \
-  Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, "%s%s%s\n", color, __FUNCTION__, COLOR_CLEAR)
+  Dali::Integration::Log::LogMessage(Dali::Integration::Log::INFO, "%s%s%s\n", color, __FUNCTION__, COLOR_CLEAR)
 
 #define LOG_THREAD_SYNC_TRACE_FMT(color, format, ...) \
-  Dali::Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, "%s%s: " format "%s\n", color, __FUNCTION__, ##__VA_ARGS__, COLOR_CLEAR)
+  Dali::Integration::Log::LogMessage(Dali::Integration::Log::INFO, "%s%s: " format "%s\n", color, __FUNCTION__, ##__VA_ARGS__, COLOR_CLEAR)
 
 #else
 
index 7747066..632cc40 100644 (file)
@@ -182,7 +182,7 @@ bool EglImplementation::InitializeGles(EGLNativeDisplayType display, bool isOwnS
   mGlesInitialized = true;
 
   // We want to display this information all the time, so use the LogMessage directly
-  Integration::Log::LogMessage(Integration::Log::DebugInfo,
+  Integration::Log::LogMessage(Integration::Log::INFO,
                                "EGL Information\n"
                                "            PartialUpdate  %d\n"
                                "            Vendor:        %s\n"
@@ -597,7 +597,7 @@ bool EglImplementation::ChooseConfig(bool isWindowType, ColorDepth depth)
     DALI_ASSERT_ALWAYS(false && "eglChooseConfig failed!");
     return false;
   }
-  Integration::Log::LogMessage(Integration::Log::DebugInfo, "Using OpenGL es %d.%d.\n", mGlesVersion / 10, mGlesVersion % 10);
+  Integration::Log::LogMessage(Integration::Log::INFO, "Using OpenGL es %d.%d.\n", mGlesVersion / 10, mGlesVersion % 10);
 
   mContextAttribs.Clear();
   if(mIsKhrCreateContextSupported)
index a9c31e7..33da896 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -415,7 +415,7 @@ void GlProxyImplementation::AccumulateSamples()
 
 void GlProxyImplementation::LogResults()
 {
-  Debug::LogMessage(Debug::DebugInfo, "OpenGL ES statistics sampled over %d frames) operations per frame:\n", mTotalFrameCount);
+  Debug::LogMessage(Debug::INFO, "OpenGL ES statistics sampled over %d frames) operations per frame:\n", mTotalFrameCount);
   LogCalls(mActiveTextureSampler);
   LogCalls(mClearSampler);
   LogCalls(mBindBufferSampler);
@@ -423,7 +423,7 @@ void GlProxyImplementation::LogResults()
   LogCalls(mDrawSampler);
   LogCalls(mUniformSampler);
   LogCalls(mUseProgramSampler);
-  Debug::LogMessage(Debug::DebugInfo, "OpenGL ES Object Count:\n");
+  Debug::LogMessage(Debug::INFO, "OpenGL ES Object Count:\n");
   LogObjectCounter(mBufferCount);
   LogObjectCounter(mTextureCount);
   LogObjectCounter(mProgramCount);
@@ -431,12 +431,12 @@ void GlProxyImplementation::LogResults()
 
 void GlProxyImplementation::LogCalls(const Sampler& sampler)
 {
-  Debug::LogMessage(Debug::DebugInfo, "  %s : Mean %5.2f  (Min:%5.2f, Max:%5.2f, StdDev:%5.2f, Actual:%d)\n", sampler.GetDescription(), sampler.GetMeanValue(), sampler.GetMin(), sampler.GetMax(), sampler.GetStandardDeviation(), sampler.GetCount());
+  Debug::LogMessage(Debug::INFO, "  %s : Mean %5.2f  (Min:%5.2f, Max:%5.2f, StdDev:%5.2f, Actual:%d)\n", sampler.GetDescription(), sampler.GetMeanValue(), sampler.GetMin(), sampler.GetMax(), sampler.GetStandardDeviation(), sampler.GetCount());
 }
 
 void GlProxyImplementation::LogObjectCounter(const ObjectCounter& sampler)
 {
-  Debug::LogMessage(Debug::DebugInfo, "  %s : %u  (Peak:%u)\n", sampler.GetDescription(), sampler.GetCount(), sampler.GetPeak());
+  Debug::LogMessage(Debug::INFO, "  %s : %u  (Peak:%u)\n", sampler.GetDescription(), sampler.GetCount(), sampler.GetPeak());
 }
 
 void GlProxyImplementation::ResetSamplers()
index c9a5866..f482372 100644 (file)
@@ -390,7 +390,7 @@ extern "C" void WriteData(png_structp png_ptr, png_bytep data, png_size_t length
 extern "C" void FlushData(png_structp png_ptr)
 {
 #ifdef DEBUG_ENABLED
-  Debug::LogMessageWithFunctionLine(Debug::DebugInfo, "PNG Flush");
+  Debug::LogMessageWithFunctionLine(Debug::INFO, "PNG Flush");
 #endif // DEBUG_ENABLED
 }
 } // namespace
index d81e456..44e5460 100644 (file)
@@ -104,7 +104,7 @@ void NetworkPerformanceServer::Start()
     int error = pthread_create(&mServerThread, NULL, ConnectionListenerFunc, this);
     DALI_ASSERT_ALWAYS(!error && "pthread create failed");
 
-    Dali::Integration::Log::LogMessage(Integration::Log::DebugInfo, "~~~ NetworkPerformanceServer started on port %d ~~~ \n", SERVER_PORT + basePort);
+    Dali::Integration::Log::LogMessage(Integration::Log::INFO, "~~~ NetworkPerformanceServer started on port %d ~~~ \n", SERVER_PORT + basePort);
   }
 }
 void NetworkPerformanceServer::Stop()
index 634d0b9..2ceb29f 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -31,14 +31,17 @@ void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& messag
 
   switch(level)
   {
-    case Dali::Integration::Log::DebugInfo:
+    case Dali::Integration::Log::DEBUG:
+      __android_log_print(ANDROID_LOG_DEBUG, DALI_TAG, "%s", message.c_str());
+      break;
+    case Dali::Integration::Log::INFO:
       __android_log_print(ANDROID_LOG_INFO, DALI_TAG, "%s", message.c_str());
       break;
-    case Dali::Integration::Log::DebugWarning:
+    case Dali::Integration::Log::WARNING:
       __android_log_print(ANDROID_LOG_WARN, DALI_TAG, "%s", message.c_str());
       break;
-    case Dali::Integration::Log::DebugError:
-      __android_log_print(ANDROID_LOG_DEBUG, DALI_TAG, "%s", message.c_str());
+    case Dali::Integration::Log::ERROR:
+      __android_log_print(ANDROID_LOG_ERROR, DALI_TAG, "%s", message.c_str());
       break;
     default:
       __android_log_print(ANDROID_LOG_DEBUG, DALI_TAG, "%s", message.c_str());
index f7f417a..576d8f1 100644 (file)
@@ -63,22 +63,22 @@ void ObjectProfiler::DisplayInstanceCounts()
     std::size_t memorySize = GetMemorySize(element.first, element.second);
     if(memorySize > 0)
     {
-      LogMessage(Debug::DebugInfo, "%-30s: % 4d  Memory MemorySize: ~% 6.1f kB\n", element.first.c_str(), element.second, memorySize / 1024.0f);
+      LogMessage(Debug::INFO, "%-30s: % 4d  Memory MemorySize: ~% 6.1f kB\n", element.first.c_str(), element.second, memorySize / 1024.0f);
     }
     else
     {
-      LogMessage(Debug::DebugInfo, "%-30s: % 4d\n", element.first.c_str(), element.second);
+      LogMessage(Debug::INFO, "%-30s: % 4d\n", element.first.c_str(), element.second);
     }
   }
-  LogMessage(Debug::DebugInfo, "\n");
+  LogMessage(Debug::INFO, "\n");
 }
 
 bool ObjectProfiler::OnTimeout()
 {
   uint32_t pixelDataSize   = Dali::PixelData::GetTotalAllocatedSize();
   uint32_t pixelBufferSize = Dali::Internal::Adaptor::PixelBuffer::GetTotalAllocatedSize();
-  LogMessage(Debug::DebugInfo, "Total PixelData: %9.1fkb\n", ((float)pixelDataSize) / 1024.0f);
-  LogMessage(Debug::DebugInfo, "Total PixelBuffer: %9.1fkb\n", ((float)pixelBufferSize) / 1024.0f);
+  LogMessage(Debug::INFO, "Total PixelData: %9.1fkb\n", ((float)pixelDataSize) / 1024.0f);
+  LogMessage(Debug::INFO, "Total PixelBuffer: %9.1fkb\n", ((float)pixelBufferSize) / 1024.0f);
 
   DisplayInstanceCounts();
   return true;
@@ -125,8 +125,7 @@ void ObjectProfiler::OnObjectDestroyed(const Dali::RefObject* object)
       {
         auto&& countIter = std::find_if(mInstanceCountContainer.begin(),
                                         mInstanceCountContainer.end(),
-                                        [theType](const InstanceCountPair& instance)
-                                        { return instance.first == theType; });
+                                        [theType](const InstanceCountPair& instance) { return instance.first == theType; });
         if(countIter != mInstanceCountContainer.end())
         {
           (*countIter).second--;
index 4f85519..ec01f5c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -116,10 +116,10 @@ PerformanceInterface::ContextId PerformanceServer::AddContext(const char* name)
   return mStatContextManager.AddContext(name, PerformanceMarker::CUSTOM_EVENTS);
 }
 
-PerformanceInterface::ContextId PerformanceServer::GetContextId( const char* name )
+PerformanceInterface::ContextId PerformanceServer::GetContextId(const char* name)
 {
   // for adding custom contexts
-  return mStatContextManager.GetContextId( name );
+  return mStatContextManager.GetContextId(name);
 }
 
 void PerformanceServer::RemoveContext(ContextId contextId)
@@ -191,7 +191,7 @@ void PerformanceServer::AddMarker(MarkerType markerType)
 
 void PerformanceServer::LogContextStatistics(const char* const text)
 {
-  Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo, text);
+  Integration::Log::LogMessage(Dali::Integration::Log::INFO, text);
 }
 
 void PerformanceServer::LogMarker(const PerformanceMarker& marker, const char* const description)
@@ -225,7 +225,7 @@ void PerformanceServer::LogMarker(const PerformanceMarker& marker, const char* c
   // log to Dali log ( this is thread safe )
   if(mPerformanceOutputBitmask & OUTPUT_DALI_LOG)
   {
-    Integration::Log::LogMessage(Dali::Integration::Log::DebugInfo,
+    Integration::Log::LogMessage(Dali::Integration::Log::INFO,
                                  "%.6f (seconds), %s\n",
                                  float(marker.GetTimeStamp().microseconds) * MICROSECONDS_TO_SECOND,
                                  description);
index 9431467..b19c2a0 100644 (file)
@@ -36,15 +36,15 @@ const int TTRACE_TAG_GRAPHICS = 1;
 
 void traceAsyncBegin(int tag, int cookie, const char* name, ...)
 {
-  Debug::LogMessage(Debug::DebugInfo, "AsyncBegin: %s : cookie %d\n", name, cookie);
+  Debug::LogMessage(Debug::INFO, "AsyncBegin: %s : cookie %d\n", name, cookie);
 }
 void traceAsyncEnd(int tag, int cookie, const char* name, ...)
 {
-  Debug::LogMessage(Debug::DebugInfo, "AsyncEnd: %s : cookie %d\n", name, cookie);
+  Debug::LogMessage(Debug::INFO, "AsyncEnd: %s : cookie %d\n", name, cookie);
 }
 void traceMark(int tag, const char* name, ...)
 {
-  Debug::LogMessage(Debug::DebugInfo, "Marker: %s \n", name);
+  Debug::LogMessage(Debug::INFO, "Marker: %s \n", name);
 }
 } // namespace
 #endif
index 4decbb4..5428f1a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -34,13 +34,16 @@ void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& messag
 
   switch(level)
   {
-    case Dali::Integration::Log::DebugInfo:
+    case Dali::Integration::Log::DEBUG:
+      print_log(DLOG_DEBUG, DALI_TAG, "%s", message.c_str());
+      break;
+    case Dali::Integration::Log::INFO:
       print_log(DLOG_INFO, DALI_TAG, "%s", message.c_str());
       break;
-    case Dali::Integration::Log::DebugWarning:
+    case Dali::Integration::Log::WARNING:
       print_log(DLOG_WARN, DALI_TAG, "%s", message.c_str());
       break;
-    case Dali::Integration::Log::DebugError:
+    case Dali::Integration::Log::ERROR:
       print_log(DLOG_ERROR, DALI_TAG, "%s", message.c_str());
       break;
     default:
index 8a41c87..dc317a5 100644 (file)
@@ -32,13 +32,16 @@ void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& messag
   const char* format = NULL;
   switch(level)
   {
-    case Dali::Integration::Log::DebugInfo:
+    case Dali::Integration::Log::DEBUG:
+      format = "\e[1;32mDEBUG:\e[21m %s: %s\e[0m";
+      break;
+    case Dali::Integration::Log::INFO:
       format = "\e[1;32mINFO:\e[21m %s: %s\e[0m";
       break;
-    case Dali::Integration::Log::DebugWarning:
+    case Dali::Integration::Log::WARNING:
       format = "\e[1;33mWARN:\e[21m %s: %s\e[0m";
       break;
-    case Dali::Integration::Log::DebugError:
+    case Dali::Integration::Log::ERROR:
       format = "\e[1;91mERROR:\e[21m %s: %s\e[0m";
       break;
     default:
index 570d67f..2784c61 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
@@ -32,13 +32,16 @@ void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& messag
   const char* format = NULL;
   switch(level)
   {
-    case Dali::Integration::Log::DebugInfo:
+    case Dali::Integration::Log::DEBUG:
+      format = "\e[1;34mDEBUG:\e[21m %s: %s\e[0m";
+      break;
+    case Dali::Integration::Log::INFO:
       format = "\e[1;34mINFO:\e[21m %s: %s\e[0m";
       break;
-    case Dali::Integration::Log::DebugWarning:
+    case Dali::Integration::Log::WARNING:
       format = "\e[1;33mWARN:\e[21m %s: %s\e[0m";
       break;
-    case Dali::Integration::Log::DebugError:
+    case Dali::Integration::Log::ERROR:
       format = "\e[1;91mERROR:\e[21m %s: %s\e[0m";
       break;
     default:
index 4a99c5a..956653f 100644 (file)
@@ -61,7 +61,7 @@ void TraceManagerTizen::LogContext(bool start, const char* tag)
 
     if(gTraceManagerEnablePrintLog)
     {
-      DALI_LOG_RELEASE_INFO("BEGIN: %s\n", tag);
+      DALI_LOG_DEBUG_INFO("BEGIN: %s\n", tag);
     }
   }
   else
@@ -70,7 +70,7 @@ void TraceManagerTizen::LogContext(bool start, const char* tag)
 
     if(gTraceManagerEnablePrintLog)
     {
-      DALI_LOG_RELEASE_INFO("END: %s\n", tag);
+      DALI_LOG_DEBUG_INFO("END: %s\n", tag);
     }
   }
 }