Ver Fonte

#IQRV #comment 优化实体日志

80374374 há 11 meses atrás
pai
commit
715d94d1db

+ 1 - 1
Module/mod_ContactlessCard/ContactlessFSM.cpp

@@ -606,7 +606,7 @@ ErrorCodeEnum CContactlessCardFSM::Load()
 			}
 			else
 			{
-				SetErrPackage("Load::GetDevCategory", m_csDevNo, hr, MEC_DEVAPI_RF_GetDevCategory);
+				SetErrPackage("Load::GetDevCategory", m_csDevNo, eErrDev, MEC_DEVAPI_RF_GetDevCategory);
 				AlarmDEC();
 				return Error_DevCommFailed;
 			}

+ 1 - 1
Module/mod_healthmanager/mod_healthmanager.cpp

@@ -1463,7 +1463,7 @@ void CHealthManagerEntity::OnEntityStateHook(const char* pszEntityName, const ch
 		case EntityState_Lost:
 		{
 			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("%s trigger by %s: from %s to %s", pszEntityName, pszTriggerEntity, SpStrEntityState(eLastState), SpStrEntityState(eState));
-			CSimpleStringA tmpWarnMsg = CSimpleStringA::Format("%s lost. trig entity:%s,lastState:%d", pszEntityName, pszTriggerEntity, eLastState);
+			CSimpleStringA tmpWarnMsg = CSimpleStringA::Format("%s lost. trig entity:%s,lastState:%s", pszEntityName, pszTriggerEntity, SpStrEntityState(eLastState));
 			CEntityStaticInfo esi = { 0 };
 			ErrorCodeEnum ec = GetFunction()->GetEntityStaticInfo(pszEntityName, esi);
 			//0x101 0x21D

+ 1 - 1
Module/mod_vtmloader/VtmLoaderFSM.cpp

@@ -542,7 +542,7 @@ void CVtmLoaderFSM::s2_on_entry()
 			ULONGLONG dwEntityEnd = SP::Module::Comm::RVCGetTickCount();
 			DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM).setAPI("SyncStartEntity").setCostTime((dwEntityEnd - dwEntityStart) / 1000)("%d", errCode);
 			if (it->first.Compare("SIPPhone") == 0)
-				LogWarn(Severity_Low, Error_Succeed, VtmLoader_SIPPhoneEntityLoad_Cost, CSimpleStringA::Format("%d", (dwEntityEnd - dwEntityStart) / 1000));
+				LogWarn(Severity_Low, Error_Succeed, VtmLoader_SIPPhoneEntityLoad_Cost, CSimpleStringA::Format("{\"subject\":\"SIPPhone loaded cost time\", \"value\":%d}", (dwEntityEnd - dwEntityStart) / 1000));
 			
 			if (errCode == Error_Succeed) {
 				it->second.eResult = LOADING_SUCCEED;

+ 1 - 1
Module/mod_vtmloader/mod_vtmloader.cpp

@@ -87,7 +87,7 @@ void CVtmLoaderEntity::OnEntityStateHook(const char* pszEntityName, const char*
 	{
 	case EntityState_Lost:
 	{
-		CSimpleStringA tmpWarnMsg = CSimpleStringA::Format("%s lost. trig entity:%s,lastState:%d", pszEntityName, pszTriggerEntity, eLastState);
+		CSimpleStringA tmpWarnMsg = CSimpleStringA::Format("%s lost. trig entity:%s,lastState:%s", pszEntityName, pszTriggerEntity, SpStrEntityState(eLastState));
 		CEntityStaticInfo esi = { 0 };
 		ErrorCodeEnum ec = GetFunction()->GetEntityStaticInfo(pszEntityName, esi);
 		//0x101 0x21D