* @brief This file defines the diagnostics types.
*/
-#include <vconf.h>
-#include <dlog.h>
-#include <assert.h>
-#include <stdio.h>
+#include <cassert>
+#include <cstdio>
+#include <cstring>
#include <unistd.h>
-#include <string.h>
#include <sys/syscall.h>
#include <sys/types.h>
+
+#include <vconf.h>
+#include <dlog.h>
+#include <appinfo.h>
+
#include <FAppTypes.h>
#include <FBaseLog.h>
#include <FBaseSysLog.h>
+
#include "FBase_Log.h"
#include "FBase_StringConverter.h"
-#include "FApp_AppInfo.h"
extern "C" {
#include <iniparser.h>
}
using namespace Tizen::Base;
-using namespace Tizen::Io;
-using namespace Tizen::Base::Collection;
-using namespace Tizen::App;
#ifdef LOG_TAG
#undef LOG_TAG
if (unlikely(!appNameLoaded))
{
appNameLoaded = true;
- char* pAppName = _StringConverter::CopyToCharArrayN(_AppInfo::GetAppExecutableName());
- strncpy(appName, pAppName, LOG_MODULE_NAME_LEN_MAX);
- delete [] pAppName;
+ strncpy(appName, appinfo_get_execname(), LOG_MODULE_NAME_LEN_MAX);
}
snprintf(logTag, LOG_MODULE_NAME_LEN_MAX, "%s", appName);
sprintf(keyString, "%s:%s", sectApp, entryInfo);
keyString[LOG_MODULE_NAME_LEN_MAX*2-1] = '\0';
- pVal = iniparser_getstr(pDic, keyString);
+ pVal = iniparser_getstring(pDic, keyString, NULL);
if (pVal == NULL)
{
ALOG(LOG_ERROR, LOG_TAG, "[EXCEPTION] finding Application/INFO failed.\n");
sprintf(keyString, "%s:%s", sectApp, entryDebug);
keyString[LOG_MODULE_NAME_LEN_MAX*2-1] = '\0';
- pVal = iniparser_getstr(pDic, keyString);
+ pVal = iniparser_getstring(pDic, keyString, NULL);
if (pVal == NULL)
{
ALOG(LOG_ERROR, LOG_TAG, "[EXCEPTION] finding Application/DEBUG failed.\n");
sprintf(keyString, "%s:%s", sectApp, entryException);
keyString[LOG_MODULE_NAME_LEN_MAX*2-1] = '\0';
- pVal = iniparser_getstr(pDic, keyString);
+ pVal = iniparser_getstring(pDic, keyString, NULL);
if (pVal == NULL)
{
ALOG(LOG_ERROR, LOG_TAG, "[EXCEPTION] finding Application/EXCEPTION failed.\n");
sprintf(keyString, "%s:%s", sectPlatform, entryInfo);
keyString[LOG_MODULE_NAME_LEN_MAX*2-1] = '\0';
- pVal = iniparser_getstr(pDic, keyString);
+ pVal = iniparser_getstring(pDic, keyString, NULL);
if (pVal == NULL)
{
ALOG(LOG_ERROR, LOG_TAG, "[EXCEPTION] finding Platform/INFO failed.\n");
sprintf(keyString, "%s:%s", sectPlatform, entryException);
keyString[LOG_MODULE_NAME_LEN_MAX*2-1] = '\0';
- pVal = iniparser_getstr(pDic, keyString);
+ pVal = iniparser_getstring(pDic, keyString, NULL);
if (pVal == NULL)
{
ALOG(LOG_ERROR, LOG_TAG, "[EXCEPTION] finding Platform/EXCEPTION failed.\n");
sprintf(keyString, "%s:%s", sectModule, logInfo.logTable[i].logIDName);
keyString[LOG_MODULE_NAME_LEN_MAX*2-1] = '\0';
- pVal = iniparser_getstr(pDic, keyString);
+ pVal = iniparser_getstring(pDic, keyString, NULL);
if (pVal == NULL)
{
ALOG(LOG_ERROR, LOG_TAG, "[EXCEPTION] finding PlatformModules/%ls failed.\n", logInfo.logTable[i].logIDName);