/***************************************************************************** * AUTHOR : Nidhi Sharma * DATE : * NAME : getAddressLoggerFunctions * DESCRIPTION : * ARGUMENTS : * RETURNS : * NOTES : * CHANGE HISTROY * Author Date Description of change *****************************************************************************/ int LTKLoggerUtil::configureLogger(const string& logFile, LTKLogger::EDebugLevel logLevel) { LTKLoggerInterface* logger = LTKLogger::getInstance(); logger->setLogLevel(logLevel); return SUCCESS; }
/***************************************************************************** * AUTHOR : Nidhi Sharma * DATE : * NAME : getAddressLoggerFunctions * DESCRIPTION : * ARGUMENTS : * RETURNS : * NOTES : * CHANGE HISTROY * Author Date Description of change *****************************************************************************/ int LTKLoggerUtil::configureLogger(const string& logFile, LTKLogger::EDebugLevel logLevel) { #if 0 /* Android port: commenting the load of shared objects and mapping of functions * as there is only one shared object. */ void* functionHandle = NULL; int returnVal = SUCCESS; FN_PTR_SETLOGFILENAME module_setLogFileName = NULL; FN_PTR_SETLOGLEVEL module_setLogLevel = NULL; if (m_libHandleLogger == NULL ) { LTKReturnError(ELOGGER_LIBRARY_NOT_LOADED); } m_ptrOSUtil = LTKOSUtilFactory::getInstance(); if ( logFile.length() != 0 ) { returnVal = m_ptrOSUtil->getFunctionAddress(m_libHandleLogger, "setLoggerFileName", &functionHandle); if(returnVal != SUCCESS) { return returnVal; } module_setLogFileName = (FN_PTR_SETLOGFILENAME)functionHandle; functionHandle = NULL; module_setLogFileName(logFile); } else { LTKReturnError(EINVALID_LOG_FILENAME); } returnVal = m_ptrOSUtil->getFunctionAddress(m_libHandleLogger, "setLoggerLevel", &functionHandle); if(returnVal != SUCCESS) { LTKReturnError(returnVal); } module_setLogLevel = (FN_PTR_SETLOGLEVEL)functionHandle; functionHandle = NULL; module_setLogLevel(logLevel); delete m_ptrOSUtil; #endif /* Android port : get an instance of logger. */ LTKLoggerInterface* logger = getLoggerInstance(); logger->setLogLevel(logLevel); return SUCCESS; }