{
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:
/*
- * 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.
{
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:
namespace DBus
{
-
/**
* @brief The CurrentBridgePtr class is to save the current Accessibility Bridge.
*/
}
}; // CurrentBridgePtr
-
// Templates for setting and getting Accessible values
namespace detail
{
~_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>
: 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);
}
};
#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
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"
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)
/*
- * 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.
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);
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);
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()
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
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()
/*
- * 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.
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());
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;
{
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--;
/*
- * 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.
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)
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)
// 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);
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
/*
- * 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.
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:
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:
/*
- * 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.
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:
if(gTraceManagerEnablePrintLog)
{
- DALI_LOG_RELEASE_INFO("BEGIN: %s\n", tag);
+ DALI_LOG_DEBUG_INFO("BEGIN: %s\n", tag);
}
}
else
if(gTraceManagerEnablePrintLog)
{
- DALI_LOG_RELEASE_INFO("END: %s\n", tag);
+ DALI_LOG_DEBUG_INFO("END: %s\n", tag);
}
}
}