Procházet zdrojové kódy

Z991239-5733 #comment feat: 升级埋点日志优化

Signed-Off-By: commit-hook
刘文涛80174520 před 1 rokem
rodič
revize
9a3a04c498
1 změnil soubory, kde provedl 100 přidání a 100 odebrání
  1. 100 100
      Module/mod_UpgradeMgr/UpgradeTaskFSM.cpp

+ 100 - 100
Module/mod_UpgradeMgr/UpgradeTaskFSM.cpp

@@ -2890,7 +2890,7 @@ ErrorCodeEnum CUpgradeTaskFSM::RollBackToHistoryVersion(CVersion historyVersion)
 		if(backupSucc){
 			if(CopyFileA(strBackupActiveFile.GetData(),strActiveFile.GetData(),FALSE)){
 				RemoveFileA(strBackupActiveFile.GetData());
-				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("RollBackToHistoryVersion")("Rollback_active.txt copy to active.txt is succ");
+				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("Rollback_active.txt copy to active.txt is succ");
 			}else{
 				LogWarn(Severity_Middle, Error_Exception, ERR_TASK_ROLL_BACK_ACTIVE_FAIL,CSimpleStringA::Format("RRollBackToHistoryVersion fail, Rollback_active.txt copy to active.txt is fail, err=%d",(int)GetLastError()).GetData());
 			}
@@ -2915,11 +2915,11 @@ ErrorCodeEnum CUpgradeTaskFSM::RollBackToHistoryVersion(CVersion historyVersion)
 	if(re!=1){
 		LogWarn(Severity_Middle, Error_Exception, ERR_TASK_ROLL_BACK_ACTIVE_FAIL, CSimpleStringA::Format("RRollBackToHistoryVersion fail, Read active.txt fail,err=%d", (int)GetLastError()).GetData());
 	}else{
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("RollBackToHistoryVersion")("read active.txt, version[%s]", cVer);
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("read active.txt, version[%s]", cVer);
 	}
 	fclose(fp);
 
-	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("RollBackToHistoryVersion")("set rollback to history version [%s] succeed", (const char*)strHisVersion);
+	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("set rollback to history version [%s] succeed", (const char*)strHisVersion);
 	return Error_Succeed;
 #else
 	bool backupSucc = true;
@@ -2941,7 +2941,7 @@ ErrorCodeEnum CUpgradeTaskFSM::RollBackToHistoryVersion(CVersion historyVersion)
 		if (backupSucc) {
 			if (fileutil_copy_file(strActiveFile.GetData(), strBackupActiveFile.GetData())==0) {
 				RemoveFileA(strBackupActiveFile.GetData());
-				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("RollBackToHistoryVersion")("Rollback_active.txt copy to active.txt is succ");
+				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("Rollback_active.txt copy to active.txt is succ");
 			}else{
 				LogWarn(Severity_Middle, Error_Exception, ERR_TASK_ROLL_BACK_ACTIVE_FAIL, CSimpleStringA::Format("RRollBackToHistoryVersion fail, Rollback_active.txt copy to active.txt is fail, err=%d", errno).GetData());
 			}
@@ -2966,11 +2966,11 @@ ErrorCodeEnum CUpgradeTaskFSM::RollBackToHistoryVersion(CVersion historyVersion)
 	if(re!=1){
 		LogWarn(Severity_Middle, Error_Exception, ERR_TASK_ROLL_BACK_ACTIVE_FAIL, CSimpleStringA::Format("RRollBackToHistoryVersion fail, Read active.txt fail,err=%d", errno).GetData());
 	}else{
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("RollBackToHistoryVersion")("read active.txt, version[%s]", cVer);
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("read active.txt, version[%s]", cVer);
 	}
 	fclose(fp);
 
-	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("RollBackToHistoryVersion")("set rollback to history version [%s] succeed", (const char*)strHisVersion);
+	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("set rollback to history version [%s] succeed", (const char*)strHisVersion);
 	return Error_Succeed;
 #endif	
 }
@@ -3079,7 +3079,7 @@ bool CUpgradeTaskFSM::RecursiveCopyDir(const char *pszSourceDir, const char *psz
 #ifdef RVC_OS_WIN
 	if (!ExistsDirA(pszSourceDir))
 	{
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("RecursiveCopyDir")("source dir [%s] not exists: %d", pszSourceDir,GetLastError());
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("source dir [%s] not exists: %d", pszSourceDir,GetLastError());
 		strErrInfo = CSimpleStringA::Format("source dir [%s] not exists: %d", pszSourceDir, GetLastError());
 		return false;
 	}
@@ -3089,16 +3089,16 @@ bool CUpgradeTaskFSM::RecursiveCopyDir(const char *pszSourceDir, const char *psz
 		if (!CreateDirRecursiveA(pszDestDir))
 		{
 			strErrInfo = CSimpleStringA::Format("create dir [%s] fail: %d", pszDestDir, GetLastError());
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("RecursiveCopyDir")("create dir fail: %s",strErrInfo.GetData());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("create dir fail: %s",strErrInfo.GetData());
 			return false;
 		}
 
-		//DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("RecursiveCopyDir")("create dir [%s] succ", pszDestDir);
+		//DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("create dir [%s] succ", pszDestDir);
 	}
 #else
 	if (!ExistsDirA(pszSourceDir))
 	{
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("RecursiveCopyDir")("source dir [%s] not exists: %d", pszSourceDir, errno);
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("source dir [%s] not exists: %d", pszSourceDir, errno);
 		strErrInfo = CSimpleStringA::Format("source dir [%s] not exists: %d", pszSourceDir, errno);
 		return false;
 	}
@@ -3108,11 +3108,11 @@ bool CUpgradeTaskFSM::RecursiveCopyDir(const char *pszSourceDir, const char *psz
 		if (!CreateDirRecursiveA(pszDestDir))
 		{
 			strErrInfo = CSimpleStringA::Format("create dir [%s] fail: %d", pszDestDir, errno);
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("RecursiveCopyDir")("create dir fail: %s",strErrInfo.GetData());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("create dir fail: %s",strErrInfo.GetData());
 			return false;
 		}
 
-		//DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("RecursiveCopyDir")("create dir [%s] succ", pszDestDir);
+		//DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("create dir [%s] succ", pszDestDir);
 	}
 #endif
 	arr = fileutil_get_sub_files_a(pszSourceDir);
@@ -3132,7 +3132,7 @@ bool CUpgradeTaskFSM::RecursiveCopyDir(const char *pszSourceDir, const char *psz
 			if (!CopyFileA(file, szDestFile, FALSE))
 			{
 				strErrInfo = CSimpleStringA::Format("copy file [%s] fail: %d", file, GetLastError());
-				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("RecursiveCopyDir")("copy file fail:%s",strErrInfo.GetData());
+				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("copy file fail:%s",strErrInfo.GetData());
 				toolkit_array_free2(arr);
 				return false;
 			}
@@ -3140,7 +3140,7 @@ bool CUpgradeTaskFSM::RecursiveCopyDir(const char *pszSourceDir, const char *psz
 			if (fileutil_copy_file(szDestFile, file)!=0)
 			{
 				strErrInfo = CSimpleStringA::Format("copy file [%s] fail: %d", file, errno);
-				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("RecursiveCopyDir")("copy file fail:%s",strErrInfo.GetData());
+				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("copy file fail:%s",strErrInfo.GetData());
 				toolkit_array_free2(arr);
 				return false;
 			}
@@ -3165,14 +3165,14 @@ bool CUpgradeTaskFSM::RecursiveCopyDir(const char *pszSourceDir, const char *psz
 			if (!RecursiveCopyDir(dir, szDestSubDir,strErrInfo))
 			{
 #ifdef RVC_OS_WIN
-				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("RecursiveCopyDir")("copy dir [%s] fail: %d", dir, GetLastError());
+				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("copy dir [%s] fail: %d", dir, GetLastError());
 				if(strErrInfo.IsNullOrEmpty()){
 					strErrInfo = CSimpleStringA::Format("copy dir [%s] fail: %d", dir, GetLastError());
 				}
 				toolkit_array_free2(arr);
 				return false;
 #else
-				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("RecursiveCopyDir")("copy dir [%s] fail: %d", dir, errno);
+				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("copy dir [%s] fail: %d", dir, errno);
 				if (strErrInfo.IsNullOrEmpty()) {
 					strErrInfo = CSimpleStringA::Format("copy dir [%s] fail: %d", dir, errno);
 				}
@@ -3181,7 +3181,7 @@ bool CUpgradeTaskFSM::RecursiveCopyDir(const char *pszSourceDir, const char *psz
 #endif				
 			}
 
-			//DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("RecursiveCopyDir")("copy dir [%s] succ", dir);
+			//DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("copy dir [%s] succ", dir);
 		}
 		toolkit_array_free2(arr);
 	}
@@ -3207,7 +3207,7 @@ bool CUpgradeTaskFSM::IsWow64Process()
 	{
 		if (!fnIsWow64Process(GetCurrentProcess(), &bIsWow64))
 		{
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("IsWow64Process")("call IsWow64Process error: %d", GetLastError());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("call IsWow64Process error: %d", GetLastError());
 			return false;
 		}
 
@@ -3215,7 +3215,7 @@ bool CUpgradeTaskFSM::IsWow64Process()
 	}
 	else
 	{
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("IsWow64Process")("get IsWow64Process error: %d", GetLastError());
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("get IsWow64Process error: %d", GetLastError());
 		return false;
 	}
 #endif
@@ -3227,7 +3227,7 @@ int CUpgradeTaskFSM::system_on(string cmdFilePath, bool isWait,CSimpleStringA &e
 #ifdef RVC_OS_WIN
 	string cmdLine = "cmd /c ";
 	cmdLine.append(cmdFilePath.c_str());
-	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("system_on")("exec bat %s",cmdLine.c_str());
+	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("exec bat %s",cmdLine.c_str());
 	return waitSystem("cmd.exe", cmdLine.c_str(), true, errMsg);
 #else
 	//linux直接用system函数即可
@@ -3252,46 +3252,46 @@ int CUpgradeTaskFSM::waitSystem(string cmd, const char * par, bool nShow,CSimple
 	if (!ShellExecuteEx(&ShExecInfo))
 	{
 		errMsg = CSimpleStringA::Format("shellExecute is fail :%d",GetLastError());
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("waitSystem")("shellExecute is fail :%s",errMsg.GetData());
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("shellExecute is fail :%s",errMsg.GetData());
 		return -1;
 	}
 	//等到该进程结束,如果5分钟没结束,强行杀死进程
 	if (WaitForSingleObject(ShExecInfo.hProcess, 5*60*1000) == WAIT_TIMEOUT)
 	{
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("waitSystem")("shellExecute is time out");
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("shellExecute is time out");
 		errMsg = CSimpleStringA::Format("shellExecute is time out");	
 		if (TerminateProcess(ShExecInfo.hProcess, 0))
 		{
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("waitSystem")("TerminateProcess is succ");
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("TerminateProcess is succ");
 
 		}else {
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("waitSystem")("TerminateProcess is fail :%d",GetLastError());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("TerminateProcess is fail :%d",GetLastError());
 		}
 		if (CloseHandle(ShExecInfo.hProcess)) 
 		{
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("waitSystem")("shellExecute CloseHandle is succ");
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("shellExecute CloseHandle is succ");
 		}else {
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("waitSystem")("shellExecute CloseHandle is fail");
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("shellExecute CloseHandle is fail");
 		}
 		return -1;
 	}
 
-	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("waitSystem")("shellExecute is succ");
+	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("shellExecute is succ");
 	DWORD exitCode = 0;
 	if (!GetExitCodeProcess(ShExecInfo.hProcess, &exitCode))
 	{
 		errMsg = CSimpleStringA::Format("GetExitCodeProcess is fail:%d",GetLastError());
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("waitSystem")("GetExitCodeProcess is fail:%s",errMsg.GetData());
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("GetExitCodeProcess is fail:%s",errMsg.GetData());
 		return -1;
 	}
 	if (CloseHandle(ShExecInfo.hProcess)) 
 	{
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("waitSystem")("shellExecute CloseHandle is succ");
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("shellExecute CloseHandle is succ");
 	}else {
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("waitSystem")("shellExecute CloseHandle is fail");
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("shellExecute CloseHandle is fail");
 	}
 	if(exitCode!=0){
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("waitSystem")("GetExitCodeProcess ret exitCode=%d",(int)exitCode);
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("GetExitCodeProcess ret exitCode=%d",(int)exitCode);
 		errMsg = CSimpleStringA::Format("GetExitCodeProcess ret exitCode=%d",(int)exitCode);
 	}
 	return exitCode;
@@ -3420,7 +3420,7 @@ ErrorCodeEnum CUpgradeTaskFSM::UnzipPack(const char* unZipPackName)
 	CSimpleStringA strDownloadsPath;
 	ErrorCodeEnum rc = m_pEntity->GetFunction()->GetPath("Downloads",  strDownloadsPath);
 	if(rc!=Error_Succeed){
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("UnzipPack")("unzipPack is fail,get Downloads Path is fail");
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("unzipPack is fail,get Downloads Path is fail");
 		return Error_Unexpect;
 	}
 	
@@ -3441,18 +3441,18 @@ ErrorCodeEnum CUpgradeTaskFSM::UnzipPack(const char* unZipPackName)
 	if (ExistsDirA(strUnzipDir.GetData()))
 	{
 		if(!RemoveDirRecursiveA(strUnzipDir.GetData())){
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("UnzipPack")("unzipPack is fail,delete exist temp unzip dir [%s] fail,err=%d",strUnzipDir.GetData(),GetLastError());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("unzipPack is fail,delete exist temp unzip dir [%s] fail,err=%d",strUnzipDir.GetData(),GetLastError());
 			return Error_Unexpect;
 		}
 	}
 	// 创建临时解压目录
 	if(!CreateDirectoryA(strUnzipDir.GetData(), NULL)){
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("UnzipPack")("unzipPack is fail,create temp unzip dir [%s] fail,err=%d",strUnzipDir.GetData(),GetLastError());
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("unzipPack is fail,create temp unzip dir [%s] fail,err=%d",strUnzipDir.GetData(),GetLastError());
 		return Error_Unexpect;
 	}	
 	//设置当前目录为主目录
 	if(!SetCurrentDirectoryA(strUnzipDir.GetData())){
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("UnzipPack")("unzipPack is fail,SetCurrentDirectoryA dir [%s] fail,err=%d",strUnzipDir.GetData(),GetLastError());
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("unzipPack is fail,SetCurrentDirectoryA dir [%s] fail,err=%d",strUnzipDir.GetData(),GetLastError());
 		return Error_Unexpect;
 	}
 
@@ -3469,7 +3469,7 @@ ErrorCodeEnum CUpgradeTaskFSM::UnzipPack(const char* unZipPackName)
 	ZRESULT zrc = GetZipItemA(hz,-1,&ze); 
 	if(zrc == ZR_OK){
 		int numitems=ze.index;
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("UnzipPack")("zip entry count is %d",ze.index);
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("zip entry count is %d",ze.index);
 		for (int i=0; i<numitems; i++)
 		{
 			zrc = GetZipItemA(hz,i,&ze);
@@ -3482,7 +3482,7 @@ ErrorCodeEnum CUpgradeTaskFSM::UnzipPack(const char* unZipPackName)
 						//Dbg("unzip [%s] UTF8 item succeed", pGBK);
 						delete[] pGBK; 
 					}else{
-						DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("UnzipPack")("unzip [%s] UTF8 item fail,result=0x%X", pGBK,(int)zrc);
+						DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("unzip [%s] UTF8 item fail,result=0x%X", pGBK,(int)zrc);
 						delete[] pGBK; 
 						break;
 					}
@@ -3492,13 +3492,13 @@ ErrorCodeEnum CUpgradeTaskFSM::UnzipPack(const char* unZipPackName)
 					if(zrc ==ZR_OK){
 						//Dbg("unzip [%s] GBK item succeed", ze.name);
 					}else{
-						DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("UnzipPack")("unzip [%s] GBK item fail,result=0x%X", ze.name,(int)zrc);
+						DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("unzip [%s] GBK item fail,result=0x%X", ze.name,(int)zrc);
 						break;
 					}
 				}
 			}else{
 				//出错,退出
-				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("UnzipPack")("unzip GetZipItemA [%d] item fail,fail=0x%X",i,(int)zrc);
+				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("unzip GetZipItemA [%d] item fail,fail=0x%X",i,(int)zrc);
 				break;
 			} 
 		}
@@ -3576,12 +3576,12 @@ ErrorCodeEnum CUpgradeTaskFSM::DeleteUnzipDir()
 	CSimpleStringA strDownloadsPath;
 	ErrorCodeEnum rc = m_pEntity->GetFunction()->GetPath("Downloads",  strDownloadsPath);
 	if(rc!=Error_Succeed){
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("DeleteUnzipDir")("DeleteUnzipDir is fail,get Downloads Path is fail");
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("DeleteUnzipDir is fail,get Downloads Path is fail");
 		return Error_Unexpect;
 	}
 	//判断解压缩文件夹名是否存在,不存在告警
 	if (m_currentTask.pack_name.IsNullOrEmpty()) {
-		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setAPI("DeleteUnzipDir")("DeleteUnzipDir is fail ,temp unzip dir name is null");
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("DeleteUnzipDir is fail ,temp unzip dir name is null");
 		return Error_Unexpect;
 	}
 	CSimpleStringA strUnzipDir = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "%s", strDownloadsPath.GetData(), m_currentTask.pack_name.GetData());
@@ -3595,9 +3595,9 @@ ErrorCodeEnum CUpgradeTaskFSM::DeleteUnzipDir()
 	{
 		if(!RemoveDirRecursiveA(strUnzipDir.GetData())){
 #ifdef RVC_OS_WIN		
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("DeleteUnzipDir")("DeleteUnzipDir fail , temp unzip dir [%s] fail,err=%d",strUnzipDir.GetData(),(int)GetLastError());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("DeleteUnzipDir fail , temp unzip dir [%s] fail,err=%d",strUnzipDir.GetData(),(int)GetLastError());
 #else
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("DeleteUnzipDir")("DeleteUnzipDir fail , temp unzip dir [%s] fail,err=%d",strUnzipDir.GetData(), errno);
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("DeleteUnzipDir fail , temp unzip dir [%s] fail,err=%d",strUnzipDir.GetData(), errno);
 #endif
 			return Error_Unexpect;
 		}else{
@@ -3704,14 +3704,14 @@ bool CUpgradeTaskFSM::ClearCurrTaskInfo()
 	CSimpleStringA strPath;
 	ErrorCodeEnum rc = m_pEntity->GetFunction()->GetPath("Downloads", strPath);
 	if(Error_Succeed != rc){
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("ClearCurrTaskInfo")("ClearCurrTaskInfo get Downloads path fail,upgradeTaskId=%s",m_currentTask.upgradeTaskId.GetData());
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("ClearCurrTaskInfo get Downloads path fail,upgradeTaskId=%s",m_currentTask.upgradeTaskId.GetData());
 		return false;
 	}
 	CSimpleStringA tempPackPath = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "%s%s", strPath.GetData(), m_currentTask.pack_name.GetData(),".tmp");
 
 	if(ExistsFileA(tempPackPath.GetData())){
 		if(!RemoveFileA(tempPackPath.GetData())){
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("ClearCurrTaskInfo")("ClearCurrTaskInfo delete tempPack fail,packPath=%s",tempPackPath.GetData());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("ClearCurrTaskInfo delete tempPack fail,packPath=%s",tempPackPath.GetData());
 			return false;
 		}
 	}
@@ -3758,7 +3758,7 @@ ErrorCodeEnum CUpgradeTaskFSM::LoadPersistTaskInfo()
 	CSimpleStringA strValue;
 	ErrorCodeEnum rc = GetRunConfigStrValue("upgradeTask", "UpgradeTaskId", strValue);
 	if(rc!=Error_Succeed){
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("LoadPersistTaskInfo")("recover upgrade state from run config, read [upgradeTask][UpgradeTaskId] fail ,err=%d",(int)rc);
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("recover upgrade state from run config, read [upgradeTask][UpgradeTaskId] fail ,err=%d",(int)rc);
 		return rc;
 	}
 	taskInfo.upgradeTaskId = strValue;
@@ -3766,42 +3766,42 @@ ErrorCodeEnum CUpgradeTaskFSM::LoadPersistTaskInfo()
 
 	rc = GetRunConfigStrValue("upgradeTask", "CreateTaskVersion", strValue);
 	if(rc!=Error_Succeed){
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("LoadPersistTaskInfo")("recover upgrade state from run config, read [upgradeTask][CreateTaskVersion] fail ,err=%d",(int)rc);
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("recover upgrade state from run config, read [upgradeTask][CreateTaskVersion] fail ,err=%d",(int)rc);
 		return rc;
 	}
 	taskInfo.createTaskVersion = strValue;
 
 	rc = GetRunConfigStrValue("upgradeTask", "PackName", strValue);
 	if(rc!=Error_Succeed){
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("LoadPersistTaskInfo")("recover upgrade state from run config, read [upgradeTask][PackName] fail ,err=%d",(int)rc);
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("recover upgrade state from run config, read [upgradeTask][PackName] fail ,err=%d",(int)rc);
 		return rc;
 	}
 	taskInfo.pack_name = strValue;
 
 	rc = GetRunConfigStrValue("upgradeTask", "PendingState", strValue);
 	if(rc!=Error_Succeed){
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("LoadPersistTaskInfo")("recover upgrade state from run config, read [upgradeTask][PendingState] fail ,err=%d",(int)rc);
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("recover upgrade state from run config, read [upgradeTask][PendingState] fail ,err=%d",(int)rc);
 		return rc;
 	}
 	taskInfo.cPendingState = strValue;
 
 	rc = GetRunConfigStrValue("upgradeTask", "NewVersion", strValue);
 	if(rc!=Error_Succeed){
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("LoadPersistTaskInfo")("recover upgrade state from run config, read [upgradeTask][NewVersion] fail ,err=%d",(int)rc);
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("recover upgrade state from run config, read [upgradeTask][NewVersion] fail ,err=%d",(int)rc);
 		return rc;
 	}
 	taskInfo.NewVersion = strValue;
 
 	rc = GetRunConfigStrValue("upgradeTask", "TaskType", strValue);
 	if (rc != Error_Succeed) {
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("LoadPersistTaskInfo")("recover upgrade state from run config, read [upgradeTask][TaskType] fail ,err=%d", (int)rc);
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("recover upgrade state from run config, read [upgradeTask][TaskType] fail ,err=%d", (int)rc);
 		return rc;
 	}
 	taskInfo.task_type = strValue;
 
 	rc = GetRunConfigStrValue("upgradeTask", "depNewVersion", strValue);
 	if (rc != Error_Succeed) {
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("LoadPersistTaskInfo")("recover upgrade state from run config, read [upgradeTask][depNewVersion] fail ,err=%d", (int)rc);
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("recover upgrade state from run config, read [upgradeTask][depNewVersion] fail ,err=%d", (int)rc);
 		return rc;
 	}
 	taskInfo.depNewVersion = strValue;
@@ -3825,13 +3825,13 @@ ErrorCodeEnum CUpgradeTaskFSM::LoadPersistTaskInfo()
 	taskInfo.stop_media_play = true;
 
 
-	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("LoadPersistTaskInfo")("recover upgrade state from run config, UpgradeTaskId=%s", taskInfo.upgradeTaskId.GetData());
-	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("LoadPersistTaskInfo")("recover upgrade state from run config, CreateTaskVersion=%s",taskInfo.createTaskVersion.GetData());
-	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("LoadPersistTaskInfo")("recover upgrade state from run config, PackName=%s",taskInfo.pack_name.GetData());
-	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("LoadPersistTaskInfo")("recover upgrade state from run config, PendingState=%s",taskInfo.cPendingState.GetData());
-	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("LoadPersistTaskInfo")("recover upgrade state from run config, NewVersion=%s",taskInfo.NewVersion.GetData());
-	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("LoadPersistTaskInfo")("recover upgrade state from run config, TaskType=%s", taskInfo.task_type.GetData());
-	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("LoadPersistTaskInfo")("recover upgrade state from run config, depNewVersion=%s", taskInfo.depNewVersion.GetData());
+	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("recover upgrade state from run config, UpgradeTaskId=%s", taskInfo.upgradeTaskId.GetData());
+	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("recover upgrade state from run config, CreateTaskVersion=%s",taskInfo.createTaskVersion.GetData());
+	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("recover upgrade state from run config, PackName=%s",taskInfo.pack_name.GetData());
+	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("recover upgrade state from run config, PendingState=%s",taskInfo.cPendingState.GetData());
+	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("recover upgrade state from run config, NewVersion=%s",taskInfo.NewVersion.GetData());
+	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("recover upgrade state from run config, TaskType=%s", taskInfo.task_type.GetData());
+	DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("recover upgrade state from run config, depNewVersion=%s", taskInfo.depNewVersion.GetData());
 
 	m_currentTask = taskInfo;
 
@@ -3850,7 +3850,7 @@ ErrorCodeEnum CUpgradeTaskFSM::loadCenterCfgInfo()
 		rc = spConfig->ReadConfigValue("UpgradeManager", "QueryPreTaskUrl", str);
 		if(rc==Error_Succeed){
 			m_centerUrl.queryPreTaskUrl = str;
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("loadCenterCfgInfo")("init read CenterSetting.ini QueryPreTaskUrl=%s",str.GetData());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("init read CenterSetting.ini QueryPreTaskUrl=%s",str.GetData());
 		}else{
 			LogWarn(Severity_Middle, rc, ERR_TASK_READ_INI_FAIL,  "get CenterSetting.ini QueryPreTaskUrl error");
 			return rc;
@@ -3859,7 +3859,7 @@ ErrorCodeEnum CUpgradeTaskFSM::loadCenterCfgInfo()
 		rc = spConfig->ReadConfigValue("UpgradeManager", "QueryContinueTaskUrl", str);
 		if(rc==Error_Succeed){
 			m_centerUrl.queryContinueTaskUrl = str;
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("loadCenterCfgInfo")("init read CenterSetting.ini QueryContinueTaskUrl=%s",str.GetData());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("init read CenterSetting.ini QueryContinueTaskUrl=%s",str.GetData());
 		}else{
 			LogWarn(Severity_Middle, rc, ERR_TASK_READ_INI_FAIL,  "get CenterSetting.ini QueryContinueTaskUrl error");
 			return rc;
@@ -3869,7 +3869,7 @@ ErrorCodeEnum CUpgradeTaskFSM::loadCenterCfgInfo()
 		rc = spConfig->ReadConfigValue("UpgradeManager", "UpdateTaskUrl", str);
 		if(rc==Error_Succeed){
 			m_centerUrl.updateTaskUrl = str;
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("loadCenterCfgInfo")("init read CenterSetting.ini UpdateTaskUrl=%s",str.GetData());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("init read CenterSetting.ini UpdateTaskUrl=%s",str.GetData());
 		}else{
 			LogWarn(Severity_Middle, rc, ERR_TASK_READ_INI_FAIL,  "get CenterSetting.ini UpdateTaskUrl error");
 			return rc;
@@ -3878,7 +3878,7 @@ ErrorCodeEnum CUpgradeTaskFSM::loadCenterCfgInfo()
 		rc = spConfig->ReadConfigValue("UpgradeManager", "QueryCurrTaskUrl", str);
 		if(rc==Error_Succeed){
 			m_centerUrl.queryCurrTaskUrl = str;
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("loadCenterCfgInfo")("init read CenterSetting.ini QueryCurrTaskUrl=%s",str.GetData());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("init read CenterSetting.ini QueryCurrTaskUrl=%s",str.GetData());
 		}else{
 			LogWarn(Severity_Middle, rc, ERR_TASK_READ_INI_FAIL,  "get CenterSetting.ini QueryCurrTaskUrl error");
 			return rc;
@@ -3887,7 +3887,7 @@ ErrorCodeEnum CUpgradeTaskFSM::loadCenterCfgInfo()
 		rc = spConfig->ReadConfigValue("UpgradeManager", "QueryNewTaskUrl", str);
 		if(rc==Error_Succeed){
 			m_centerUrl.queryNewTaskUrl = str;
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("loadCenterCfgInfo")("init read CenterSetting.ini QueryNewTaskUrl=%s",str.GetData());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("init read CenterSetting.ini QueryNewTaskUrl=%s",str.GetData());
 		}else{
 			LogWarn(Severity_Middle, rc, ERR_TASK_READ_INI_FAIL,  "get CenterSetting.ini QueryNewTaskUrl error");
 			return rc;
@@ -3896,7 +3896,7 @@ ErrorCodeEnum CUpgradeTaskFSM::loadCenterCfgInfo()
 		rc = spConfig->ReadConfigValue("UpgradeManager", "QueryTaskStatus", str);
 		if(rc==Error_Succeed){
 			m_centerUrl.queryTaskStatus = str;
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("loadCenterCfgInfo")("init read CenterSetting.ini QueryTaskStatus=%s",str.GetData());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("init read CenterSetting.ini QueryTaskStatus=%s",str.GetData());
 		}else{
 			LogWarn(Severity_Middle, rc, ERR_TASK_READ_INI_FAIL,  "get CenterSetting.ini QueryTaskStatus error");
 			return rc;
@@ -3905,7 +3905,7 @@ ErrorCodeEnum CUpgradeTaskFSM::loadCenterCfgInfo()
 		rc = spConfig->ReadConfigValue("UpgradeManager", "SendSM3TaskUrl", str);
 		if(rc==Error_Succeed){
 			m_centerUrl.sendSM3TaskUrl = str;
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("loadCenterCfgInfo")("init read CenterSetting.ini SendSM3TaskUrl=%s",str.GetData());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("init read CenterSetting.ini SendSM3TaskUrl=%s",str.GetData());
 		}else{
 			LogWarn(Severity_Middle, rc, ERR_TASK_READ_INI_FAIL,  "get CenterSetting.ini SendSM3TaskUrl error");
 			return rc;
@@ -3923,7 +3923,7 @@ ErrorCodeEnum CUpgradeTaskFSM::loadCenterCfgInfo()
 				}
 				
 			}
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("loadCenterCfgInfo")("init read CenterSetting.ini NewEachDownloadLen=%d K", m_newEachDownloadLen);
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("init read CenterSetting.ini NewEachDownloadLen=%d K", m_newEachDownloadLen);
 		}else{
 			LogWarn(Severity_Middle, rc, ERR_TASK_READ_INI_FAIL,  "get CenterSetting.ini NewEachDownloadLen error");
 			return rc;
@@ -3937,7 +3937,7 @@ ErrorCodeEnum CUpgradeTaskFSM::loadCenterCfgInfo()
 			}else{
 				m_PrintHttpLog = true;
 			}
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("loadCenterCfgInfo")("init read CenterSetting.ini PrintLog=%d",printlogInt);
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("init read CenterSetting.ini PrintLog=%d",printlogInt);
 		}else{
 			LogWarn(Severity_Middle, rc, ERR_TASK_READ_INI_FAIL,  "get CenterSetting.ini PrintLog error");
 			return rc;
@@ -3950,7 +3950,7 @@ ErrorCodeEnum CUpgradeTaskFSM::loadCenterCfgInfo()
 			}else{
 				m_startFlag = true;
 			}
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("loadCenterCfgInfo")("init read CenterSetting.ini StartFlag=%d",startFlagInt);
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("init read CenterSetting.ini StartFlag=%d",startFlagInt);
 		}else{
 			LogWarn(Severity_Middle, rc, ERR_TASK_READ_INI_FAIL,  "get CenterSetting.ini StartFlag error");
 			return rc;
@@ -3966,7 +3966,7 @@ ErrorCodeEnum CUpgradeTaskFSM::loadCenterCfgInfo()
 					m_queryNewTaskInterval = queryNewTaskInterval;
 				}
 			}
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("loadCenterCfgInfo")("init read CenterSetting.ini queryNewTaskInterval=%d", m_queryNewTaskInterval);
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("init read CenterSetting.ini queryNewTaskInterval=%d", m_queryNewTaskInterval);
 		}
 		else {
 			LogWarn(Severity_Middle, rc, ERR_TASK_READ_INI_FAIL, "get CenterSetting.ini queryNewTaskInterval error");
@@ -3979,7 +3979,7 @@ ErrorCodeEnum CUpgradeTaskFSM::loadCenterCfgInfo()
 			if (installStopCopyDep == 1) {
 				m_installStopCopyDep = true;//配置1时停止拷贝
 			}
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("loadCenterCfgInfo")("init read CenterSetting.ini installStopCopyDep=%d", m_installStopCopyDep);
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("init read CenterSetting.ini installStopCopyDep=%d", m_installStopCopyDep);
 		}
 		else {
 			LogWarn(Severity_Middle, rc, ERR_TASK_READ_INI_FAIL, "get CenterSetting.ini installStopCopyDep error");
@@ -3990,7 +3990,7 @@ ErrorCodeEnum CUpgradeTaskFSM::loadCenterCfgInfo()
 		rc = spConfig->ReadConfigValue("UpgradeManager", "relativeDir", str);
 		if(rc==Error_Succeed){
 			m_hashScanSet.relativeDir = str;
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("loadCenterCfgInfo")("init read CenterSetting.ini relativeDir=%s",str.GetData());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("init read CenterSetting.ini relativeDir=%s",str.GetData());
 		}else{
 			LogWarn(Severity_Middle, rc, ERR_TASK_READ_INI_FAIL,  "get CenterSetting.ini relativeDir error");
 			return rc;
@@ -3998,7 +3998,7 @@ ErrorCodeEnum CUpgradeTaskFSM::loadCenterCfgInfo()
 		rc = spConfig->ReadConfigValue("UpgradeManager", "absoluteDir", str);
 		if(rc==Error_Succeed){
 			m_hashScanSet.absoluteDir = str;
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("loadCenterCfgInfo")("init read CenterSetting.ini absoluteDir=%s",str.GetData());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("init read CenterSetting.ini absoluteDir=%s",str.GetData());
 		}else{
 			LogWarn(Severity_Middle, rc, ERR_TASK_READ_INI_FAIL,  "get CenterSetting.ini absoluteDir error");
 			return rc;
@@ -4006,7 +4006,7 @@ ErrorCodeEnum CUpgradeTaskFSM::loadCenterCfgInfo()
 		rc = spConfig->ReadConfigValue("UpgradeManager", "currVerDir", str);
 		if(rc==Error_Succeed){
 			m_hashScanSet.currVerDir = str;
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("loadCenterCfgInfo")("init read CenterSetting.ini currVerDir=%s",str.GetData());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("init read CenterSetting.ini currVerDir=%s",str.GetData());
 		}else{
 			LogWarn(Severity_Middle, rc, ERR_TASK_READ_INI_FAIL,  "get CenterSetting.ini currVerDir error");
 			return rc;
@@ -4019,7 +4019,7 @@ ErrorCodeEnum CUpgradeTaskFSM::loadCenterCfgInfo()
 			{
 				m_FileBlacklist.push_back(arr[i]);
 			}
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("loadCenterCfgInfo")("init read CenterSetting.ini blackFile=%s",str.GetData());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("init read CenterSetting.ini blackFile=%s",str.GetData());
 		}else{
 			LogWarn(Severity_Middle, rc, ERR_TASK_READ_INI_FAIL,  "get CenterSetting.ini blackFile error");
 			return rc;
@@ -4032,7 +4032,7 @@ ErrorCodeEnum CUpgradeTaskFSM::loadCenterCfgInfo()
 			{
 				m_DirBlacklist.push_back(arr[i]);
 			}
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("loadCenterCfgInfo")("init read CenterSetting.ini blackDir=%s",str.GetData());
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("init read CenterSetting.ini blackDir=%s",str.GetData());
 		}else{
 			LogWarn(Severity_Middle, rc, ERR_TASK_READ_INI_FAIL,  "get CenterSetting.ini blackDir error");
 			return rc;
@@ -4099,30 +4099,30 @@ ErrorCodeEnum CUpgradeTaskFSM::GetSM3List(CSimpleStringA &strSM3List)
 	ErrorCodeEnum rc = Error_Succeed ;
 	if(!m_hashScanSet.absoluteDir.IsNullOrEmpty()){
 		//绝对路径扫描
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("GetSM3List")("GetSM3List scan absoluteDir=%s",m_hashScanSet.absoluteDir.GetData());
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("GetSM3List scan absoluteDir=%s",m_hashScanSet.absoluteDir.GetData());
 		rc = ScanSM3ByType(1,m_hashScanSet.absoluteDir);
 		if(rc!=Error_Succeed){
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("GetSM3List")("GetMD5List fail ,scan absoluteDir is fail");
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("GetMD5List fail ,scan absoluteDir is fail");
 			return rc;
 		}
 	}
 
 	if(!m_hashScanSet.relativeDir.IsNullOrEmpty()){
 		//相对路径扫描
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("GetSM3List")("GetSM3List scan relativeDir=%s",m_hashScanSet.relativeDir.GetData());
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("GetSM3List scan relativeDir=%s",m_hashScanSet.relativeDir.GetData());
 		ScanSM3ByType(2,m_hashScanSet.relativeDir);
 		if(rc!=Error_Succeed){
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("GetSM3List")("GetMD5List fail ,scan relativeDir is fail");
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("GetMD5List fail ,scan relativeDir is fail");
 			return rc;
 		}
 	}
 
 	if(!m_hashScanSet.currVerDir.IsNullOrEmpty()){
 		//当前版本扫描
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("GetSM3List")("GetSM3List scan currVerDir=%s",m_hashScanSet.currVerDir.GetData());
+		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("GetSM3List scan currVerDir=%s",m_hashScanSet.currVerDir.GetData());
 		ScanSM3ByType(3,m_hashScanSet.currVerDir);
 		if(rc!=Error_Succeed){
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("GetSM3List")("GetMD5List fail ,scan currVerDir is fail");
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("GetMD5List fail ,scan currVerDir is fail");
 			return rc;
 		}
 	}
@@ -4161,11 +4161,11 @@ ErrorCodeEnum CUpgradeTaskFSM::ScanSM3ByType(int type,CSimpleStringA pathFilter)
 				int pos = runPathStr.find_last_of(SPLIT_SLASH);
 				rootPath = runPathStr.substr(0,pos).c_str();
 			}else{
-				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("ScanSM3ByType")("ScanSM3ByType get Root path is null");
+				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("ScanSM3ByType get Root path is null");
 				return Error_Null;
 			}
 		}else{
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("ScanSM3ByType")("ScanSM3ByType get Root path is error");
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("ScanSM3ByType get Root path is error");
 			return Error;
 		}
 
@@ -4175,11 +4175,11 @@ ErrorCodeEnum CUpgradeTaskFSM::ScanSM3ByType(int type,CSimpleStringA pathFilter)
 			if(!tempCurrPath.IsNullOrEmpty()){
 				currPath = tempCurrPath;
 			}else{
-				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("ScanSM3ByType")("ScanSM3ByType get currVer path is null");
+				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("ScanSM3ByType get currVer path is null");
 				return Error_Null;
 			}
 		}else{
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("ScanSM3ByType")("ScanSM3ByType get currVer path is error");
+			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("ScanSM3ByType get currVer path is error");
 			return Error;
 		}
 
@@ -4232,7 +4232,7 @@ ErrorCodeEnum CUpgradeTaskFSM::NewSM3Folder(CSimpleStringA scanFilter,CSimpleStr
 	if(scanFilter.IsNullOrEmpty()){
 		return Error_Succeed;
 	}
-	//DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("NewSM3Folder")("scan file scanFilter is %s",scanFilter.GetData());
+	//DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("scan file scanFilter is %s",scanFilter.GetData());
 	//通配符
 	if(scanFilter.IndexOf("*")>0){
 		//找到要扫描的文件夹
@@ -4268,7 +4268,7 @@ ErrorCodeEnum CUpgradeTaskFSM::NewSM3Folder(CSimpleStringA scanFilter,CSimpleStr
 					itorFile++;
 				}
 				if(isBlackFile){
-					//DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("NewSM3Folder")("BlackFile Filter don't add to md5 list, file = [%s]", tempFullName.GetData());
+					//DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("BlackFile Filter don't add to md5 list, file = [%s]", tempFullName.GetData());
 					m_iBlackFileCount++;
 					continue;
 				}
@@ -4286,7 +4286,7 @@ ErrorCodeEnum CUpgradeTaskFSM::NewSM3Folder(CSimpleStringA scanFilter,CSimpleStr
 				}
 
 				if(isBlackDir){
-					DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("NewSM3Folder")("BlackDir Filter don't add to md5 list, dir = [%s]", tempFullName.GetData());
+					DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("BlackDir Filter don't add to md5 list, dir = [%s]", tempFullName.GetData());
 					continue;
 				}
 				//计算hash值,加入到hash列表
@@ -4294,7 +4294,7 @@ ErrorCodeEnum CUpgradeTaskFSM::NewSM3Folder(CSimpleStringA scanFilter,CSimpleStr
 				ErrorCodeEnum rErrcode = SM3FileToStr(tempFullName, strMD5Val,false);
 				if (Error_Succeed != rErrcode)
 				{
-					DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("NewSM3Folder")("%s get sm3 fail ,error:%d", tempFullName.GetData(), (int)rErrcode);
+					DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("%s get sm3 fail ,error:%d", tempFullName.GetData(), (int)rErrcode);
 					return rErrcode;
 				}
 				CSimpleStringA relativePath = CSimpleStringA::Format("%s" SPLIT_SLASH_STR "%s",replaceDir.GetData(),tempFile.GetData());
@@ -4324,7 +4324,7 @@ ErrorCodeEnum CUpgradeTaskFSM::NewSM3Folder(CSimpleStringA scanFilter,CSimpleStr
 				itorFile++;
 			}
 			if(isBlackFile){
-				//DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("NewSM3Folder")("BlackFile Filter don't add to md5 list, file = [%s]", scanFilter.GetData());
+				//DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("BlackFile Filter don't add to md5 list, file = [%s]", scanFilter.GetData());
 				m_iBlackFileCount++;
 			}
 			//整个黑名单文件夹过滤
@@ -4340,7 +4340,7 @@ ErrorCodeEnum CUpgradeTaskFSM::NewSM3Folder(CSimpleStringA scanFilter,CSimpleStr
 				itorDir++;
 			}
 			if(isBlackDir){
-				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("NewSM3Folder")("BlackDir Filter don't add to md5 list, dir = [%s]", scanFilter.GetData());
+				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("BlackDir Filter don't add to md5 list, dir = [%s]", scanFilter.GetData());
 			}
 
 			if(!isBlackDir&&!isBlackFile){
@@ -4349,7 +4349,7 @@ ErrorCodeEnum CUpgradeTaskFSM::NewSM3Folder(CSimpleStringA scanFilter,CSimpleStr
 				ErrorCodeEnum rErrcode = SM3FileToStr(scanFilter, strMD5Val,false);
 				if (Error_Succeed != rErrcode)
 				{
-					DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("NewSM3Folder")("%s get sm3 fail ,error:%d", scanFilter.GetData(), (int)rErrcode);
+					DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM)("%s get sm3 fail ,error:%d", scanFilter.GetData(), (int)rErrcode);
 					return rErrcode;
 				}
 				CSimpleStringA tempFileName = _GetFileName(scanFilter.GetData());
@@ -4369,13 +4369,13 @@ ErrorCodeEnum CUpgradeTaskFSM::NewSM3Folder(CSimpleStringA scanFilter,CSimpleStr
 
 ErrorCodeEnum CUpgradeTaskFSM::RollBackVersionCheck(string& failReason, CSimpleStringA& strErrMsg)
 {
-	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("RollBackVersionCheck")("begin RollBackVersionCheck");
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("begin RollBackVersionCheck");
 	//获取新版本号
 
 	CSimpleStringA rootVerPath;
 	ErrorCodeEnum rc = m_pEntity->GetFunction()->GetPath("RootVer", rootVerPath);//获取version根路径
 	if (rc != Error_Succeed) {
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("RollBackVersionCheck")("RollBackVersionCheck fail , get RootVer path is fail");
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("RollBackVersionCheck fail , get RootVer path is fail");
 		LogWarn(Severity_Middle, Error_Exception, ERR_TASK_ROLLBACK_VERSION_CHECK_FAIL, "RollBackVersionCheck: get RootVer path is fail");
 		failReason = "C";
 		strErrMsg = "RollBackVersionCheck fail , get RootVer path is fail";
@@ -4441,7 +4441,7 @@ void CUpgradeTaskFSM::judgeTaskClass()
 		//非安装时判断:判断只有一条拷贝dep路径的策略
 		if (!m_currentTask.install_step.empty()) {
 			int iCount = m_currentTask.install_step.size();
-			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("judgeTaskClass")("install cmd size = %d", iCount);
+			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("install cmd size = %d", iCount);
 			if (iCount == 1) {
 				CInstallStep* tmp = m_currentTask.install_step.front();
 				if (tmp->cmdType == "Copy") {
@@ -4467,7 +4467,7 @@ ErrorCodeEnum CUpgradeTaskFSM::judgeRollbackTaskClass(CSimpleStringA verDirName,
 	CSimpleStringA verPathStr(true);
 	ErrorCodeEnum Err = GetEntityBase()->GetFunction()->GetPath("DepBase", depPathStr);
 	if (Err != Error_Succeed) {
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("judgeRollbackTaskClass")("judgeRollbackTaskClass fail , get DepBase path is fail");
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("judgeRollbackTaskClass fail , get DepBase path is fail");
 		LogWarn(Severity_Middle, Error_Exception, ERR_TASK_ROLLBACK_VERSION_CHECK_FAIL, "judgeRollbackTaskClass: get DepBase path is fail");
 		failReason = "C";
 		strErrMsg = "judgeRollbackTaskClass fail , get DepBase path is fail";
@@ -4476,7 +4476,7 @@ ErrorCodeEnum CUpgradeTaskFSM::judgeRollbackTaskClass(CSimpleStringA verDirName,
 	Err = m_pEntity->GetFunction()->GetPath("RootVer", verPathStr);
 
 	if (Err != Error_Succeed) {
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("judgeRollbackTaskClass")("judgeRollbackTaskClass fail , get RootVer path is fail");
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("judgeRollbackTaskClass fail , get RootVer path is fail");
 		LogWarn(Severity_Middle, Error_Exception, ERR_TASK_ROLLBACK_VERSION_CHECK_FAIL, "judgeRollbackTaskClass: get RootVer path is fail");
 		failReason = "C";
 		strErrMsg = "judgeRollbackTaskClass fail , get RootVer path is fail";
@@ -4485,12 +4485,12 @@ ErrorCodeEnum CUpgradeTaskFSM::judgeRollbackTaskClass(CSimpleStringA verDirName,
 
 	CSimpleStringA strDestDir = "";
 	if (DirIsExist(verPathStr.GetData(), verDirName.GetData())) {
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("judgeRollbackTaskClass")("app version dir find is ok,dir=%s", verDirName.GetData());
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("app version dir find is ok,dir=%s", verDirName.GetData());
 		m_TempDepUpgradeFlag = false;//应用版本
 		return Error_Succeed;
 	}
 	else if (DirIsExist(depPathStr.GetData(), verDirName.GetData())) {
-		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("judgeRollbackTaskClass")("dep version dir find is ok, dir=%s", verDirName.GetData());
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI(__FUNCTION__)("dep version dir find is ok, dir=%s", verDirName.GetData());
 		m_TempDepUpgradeFlag = true;//适配器版本
 		return Error_Succeed;
 	}