Fix LogMessage format to print Filename / Functioname / Line 39/265539/3
authorEunki, Hong <eunkiki.hong@samsung.com>
Thu, 21 Oct 2021 13:38:42 +0000 (22:38 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Fri, 22 Oct 2021 06:12:20 +0000 (15:12 +0900)
Add LogMessageDlogFormat macro to apply these informations :
Filename: Function(Line#) > "messages"

Previous LogMessage function always print like this
logging-tizen.cpp: LogMessage(38) > "messages"
So we fix to print actual informations

Default LogMessage(~~) will be used when someone don't need to follow up
Dlog format. (like ttrace and perfomance logger)

Change-Id: Ib54b6ad2dd904dffa3d5e705b9209790850e779d
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali/internal/imaging/common/loader-png.cpp
dali/internal/system/tizen-wayland/logging-tizen.cpp

index 4d76f97..397b822 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::LogMessage(Debug::DebugInfo, "PNG Flush");
+  Debug::LogMessageWithFunctionLine(Debug::DebugInfo, "PNG Flush");
 #endif // DEBUG_ENABLED
 }
 } // namespace
index 4ed6814..4decbb4 100644 (file)
@@ -35,16 +35,16 @@ void LogMessage(Dali::Integration::Log::DebugPriority level, std::string& messag
   switch(level)
   {
     case Dali::Integration::Log::DebugInfo:
-      LOG(LOG_INFO, DALI_TAG, "%s", message.c_str());
+      print_log(DLOG_INFO, DALI_TAG, "%s", message.c_str());
       break;
     case Dali::Integration::Log::DebugWarning:
-      LOG(LOG_WARN, DALI_TAG, "%s", message.c_str());
+      print_log(DLOG_WARN, DALI_TAG, "%s", message.c_str());
       break;
     case Dali::Integration::Log::DebugError:
-      LOG(LOG_ERROR, DALI_TAG, "%s", message.c_str());
+      print_log(DLOG_ERROR, DALI_TAG, "%s", message.c_str());
       break;
     default:
-      LOG(LOG_DEFAULT, DALI_TAG, "%s", message.c_str());
+      print_log(DLOG_DEFAULT, DALI_TAG, "%s", message.c_str());
       break;
   }
 #pragma GCC diagnostic pop