#define WEB_RESERVED(X) NID_WEB+X
#define SHELL_RESERVED(X) NID_SHELL+X
-LogInfo logInfo =
+static LogInfo logInfo =
{
{
//OSP Namespace ID ===============================================================
{
va_list args;
- if (!envLoaded)
+ if (unlikely(!envLoaded))
{
int ret = access("/home/developer/.platforminfologgingmode", F_OK);
if (ret == 0)
{
va_list args;
- if (!envLoaded)
+ if (unlikely(!envLoaded))
{
int ret = access("/home/developer/.platforminfologgingmode", F_OK);
if (ret == 0)
void
__PrintLog(_LogType type, const char* pFunction, int lineNumber, const char* pFormat, va_list args)
{
- if (!iniLoaded)
+ if (unlikely(!iniLoaded))
{
__InitializeLogInfo();
}
char logTag[LOG_MODULE_NAME_LEN_MAX];
- if (!appNameLoaded)
+ if (unlikely(!appNameLoaded))
{
appNameLoaded = true;
char* pAppName = _StringConverter::CopyToCharArrayN(_AppInfo::GetAppExecutableName());
void
__PrintLogTag(const char* pTag, _LogType type, const char* pFunction, int lineNumber, const char* pFormat, va_list args)
{
- if (!iniLoaded)
+ if (unlikely(!iniLoaded))
{
__InitializeLogInfo();
}
void
__PrintSysLog(_LogType type, LogID id, const char* pFunction, int lineNumber, const char* pFormat, va_list args)
{
- if (!iniLoaded)
+ if (unlikely(!iniLoaded))
{
__InitializeLogInfo();
}
void
__PrintSysLogTag(const char* pTag, _LogType type, LogID id, const char* pFunction, int lineNumber, const char* pFormat, va_list args)
{
- if (!iniLoaded)
+ if (unlikely(!iniLoaded))
{
__InitializeLogInfo();
}
}
}
-char*
+const char*
__GetModuleName(LogID id)
{
return logInfo.logTable[id].logModuleName;
void
__InitializeLogLevel(const Registry& reg)
{
- String sectApp(L"Application");
- String sectPlatform(L"Platform");
+ const String sectApp(L"Application");
+ const String sectPlatform(L"Platform");
- String entryInfo(L"INFO");
- String entryDebug(L"DEBUG");
- String entryException(L"EXCEPTION");
+ const String entryInfo(L"INFO");
+ const String entryDebug(L"DEBUG");
+ const String entryException(L"EXCEPTION");
- String strYes(L"YES");
+ const String strYes(L"YES");
String retString;
result r;
void
__InitializePlatformModule(const Registry& reg)
{
- String strYes(L"YES");
+ const String strYes(L"YES");
String retString;
- String sectModule(L"PlatformModules");
+ const String sectModule(L"PlatformModules");
result r;