|
@@ -653,7 +653,7 @@ int CHealthManagerEntity::CheckGuardianIsRun(bool bStart)
|
|
|
int ret = kill(pID, 0);
|
|
int ret = kill(pID, 0);
|
|
|
if (0 == ret)
|
|
if (0 == ret)
|
|
|
{
|
|
{
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("guardian.exe is active, pid:%d", pID);
|
|
|
|
|
|
|
+ DbgWithLink(LOG_LEVEL_DEBUG, LOG_TYPE_SYSTEM)("guardian.exe is active, pid:%d", pID);
|
|
|
return 1;
|
|
return 1;
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
@@ -1743,7 +1743,6 @@ bool CHealthManagerEntity::IsTestMode()
|
|
|
|
|
|
|
|
void CHealthManagerEntity::OnEntityStateHook(const char* pszEntityName, const char* pszTriggerEntity, EntityStateEnum eState, EntityStateEnum eLastState)
|
|
void CHealthManagerEntity::OnEntityStateHook(const char* pszEntityName, const char* pszTriggerEntity, EntityStateEnum eState, EntityStateEnum eLastState)
|
|
|
{
|
|
{
|
|
|
- DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("%s trigger by %s: from %s to %s", pszEntityName, pszTriggerEntity, SpStrEntityState(eLastState), SpStrEntityState(eState));
|
|
|
|
|
CSmartPointer<IEntityFunction> pFunc = GetFunction();
|
|
CSmartPointer<IEntityFunction> pFunc = GetFunction();
|
|
|
CSmartPointer<IEntityFunctionPrivilege> pFuncPrivilege = pFunc.ConvertCase<IEntityFunctionPrivilege>();
|
|
CSmartPointer<IEntityFunctionPrivilege> pFuncPrivilege = pFunc.ConvertCase<IEntityFunctionPrivilege>();
|
|
|
if (pFuncPrivilege == NULL)
|
|
if (pFuncPrivilege == NULL)
|
|
@@ -1758,6 +1757,7 @@ void CHealthManagerEntity::OnEntityStateHook(const char* pszEntityName, const ch
|
|
|
{
|
|
{
|
|
|
case EntityState_Lost:
|
|
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:%d", pszEntityName, pszTriggerEntity, eLastState);
|
|
|
CEntityStaticInfo esi = { 0 };
|
|
CEntityStaticInfo esi = { 0 };
|
|
|
ErrorCodeEnum ec = GetFunction()->GetEntityStaticInfo(pszEntityName, esi);
|
|
ErrorCodeEnum ec = GetFunction()->GetEntityStaticInfo(pszEntityName, esi);
|