Browse Source

#IQRV #comment 日志打印错误修复

gifur 2 years ago
parent
commit
36bee7d3b8
1 changed files with 6 additions and 6 deletions
  1. 6 6
      Module/mod_UpgradeMgr/UpgradeTaskFSM.cpp

+ 6 - 6
Module/mod_UpgradeMgr/UpgradeTaskFSM.cpp

@@ -2325,7 +2325,7 @@ int CUpgradeTaskFSM::ExecRunCmd(CSimpleStringA &strErrMsg,CInstallStep* ins)
 			return false;
 		}
 	}else{
-		DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("ExecRunCmd")("ExecRunCmd destPathType is invalid %s",ins->dstPathType.GetData());
+		DbgWithLink(LOG_LEVEL_ERROR,LOG_TYPE_SYSTEM).setAPI("ExecRunCmd")("ExecRunCmd destPathType is invalid %s",ins->dstPathType.GetData());
 		strErrMsg = CSimpleStringA::Format("ExecRunCmd destPathType is invalid %s",ins->dstPathType.GetData());
 		return false;//不支持的路径类型
 	}
@@ -2343,7 +2343,7 @@ int CUpgradeTaskFSM::ExecRunCmd(CSimpleStringA &strErrMsg,CInstallStep* ins)
 		if (bIsWow64)
 		{
 			if (!Wow64DisableWow64FsRedirection(&pRedirectOldValue)){
-				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("ExecRunCmd")("Wow64DisableWow64FsRedirection fail: %d", GetLastError());
+				DbgWithLink(LOG_LEVEL_ERROR,LOG_TYPE_SYSTEM).setAPI("ExecRunCmd")("Wow64DisableWow64FsRedirection fail: %d", GetLastError());
 			}else{
 				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("ExecRunCmd")("Wow64DisableWow64FsRedirection succ");
 			}
@@ -2366,7 +2366,7 @@ int CUpgradeTaskFSM::ExecRunCmd(CSimpleStringA &strErrMsg,CInstallStep* ins)
 #endif
 		if(ret!=0){
 			//程序执行异常,结果未知
-			DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("ExecRunCmd")("ExecRunCmd is fail, system_on exec unknown , ret=%d, err=%s",ret, strerror(errno));
+			DbgWithLink(LOG_LEVEL_ERROR,LOG_TYPE_SYSTEM).setAPI("ExecRunCmd")("ExecRunCmd is fail, system_on exec unknown , ret=%d, err=%s",ret, strerror(errno));
 			strErrMsg = CSimpleStringA::Format("ExecRunCmd is fail, system_on exec unknown  ret=%d, err=%s", ret, strerror(errno));
 			return -1;//未知结果返回
 
@@ -2382,7 +2382,7 @@ int CUpgradeTaskFSM::ExecRunCmd(CSimpleStringA &strErrMsg,CInstallStep* ins)
 			//获取结果文件
 			if (!GetSysUpgradeResult(strResultLog, eErrorCode, strErrMsg))
 			{
-				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("ExecRunCmd")("ExecRunCmd is fail, get result from result.log fail, %s", strErrMsg.GetData());
+				DbgWithLink(LOG_LEVEL_ERROR,LOG_TYPE_SYSTEM).setAPI("ExecRunCmd")("ExecRunCmd is fail, get result from result.log fail, %s", strErrMsg.GetData());
 				strErrMsg = CSimpleStringA::Format("ExecRunCmd is fail ,get result from result.log fail, %s", strErrMsg.GetData());
 				return 0;//失败
 			}
@@ -2392,8 +2392,8 @@ int CUpgradeTaskFSM::ExecRunCmd(CSimpleStringA &strErrMsg,CInstallStep* ins)
 				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("ExecRunCmd")("ExecRunCmd is succ,[%s] ", destPath.GetData());
 				return 1;//成功
 			}else{
-				DbgWithLink(LOG_LEVEL_INFO,LOG_TYPE_SYSTEM).setAPI("ExecRunCmd")("ExecRunCmd is fail,errorCode = %d", eErrorCode.GetData());
-				strErrMsg = CSimpleStringA::Format("ExecRunCmd is fail,errorCode = %d", eErrorCode.GetData());
+				DbgWithLink(LOG_LEVEL_ERROR,LOG_TYPE_SYSTEM).setAPI("ExecRunCmd")("ExecRunCmd is fail,errorCode = %s,%s", eErrorCode.GetData(), strErrMsg.GetData());
+				strErrMsg = CSimpleStringA::Format("ExecRunCmd is fail,errorCode = %s,%s", eErrorCode.GetData(), strErrMsg.GetData());
 				return 0;//失败
 			}
 		}