Browse Source

#IQRV #comment [Log] 日志补充

gifur 3 years ago
parent
commit
52d1b7e692
2 changed files with 5 additions and 6 deletions
  1. 1 1
      Module/mod_gpio/mod_gpio.cpp
  2. 4 5
      Module/mod_pinpad/PinPadFSM.cpp

+ 1 - 1
Module/mod_gpio/mod_gpio.cpp

@@ -193,7 +193,7 @@ void CGpioEntity::ToLogRootINIInfo()
     if (!entityName.IsNullOrEmpty()) {
         LogWarn(Severity_Low, Error_Debug, GPIO_UserErrorCode_Real_Root_Config, strResult.second.c_str());
     } else {
-        Dbg("Entity Name is empty, please check!!!");
+        DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Entity Name is empty, please check!!!");
     }
     return;
 }

+ 4 - 5
Module/mod_pinpad/PinPadFSM.cpp

@@ -1097,7 +1097,7 @@ void CPinPadFSM::OpenInputText(void *pUserdata)
 	err = m_hDevHelper->KeyRead(btCh);
 	INT64 i64End = GetTickCount();
 	if ((i64End - i64Start) > 3000)//more than 3 seconds
-		Dbg("KeyRead cost more than %d seconds.", (i64End - i64Start)/1000);
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER)("KeyRead cost more than %d seconds.", (i64End - i64Start)/1000);
 	if (err == Error_Succeed) {
 		LogEvent(Severity_Middle, LOG_EVT_PINPAD_OP, "PinPad op(Any).");
 		PushInputChar(m_buf, btCh);
@@ -1246,7 +1246,6 @@ ErrorCodeEnum CPinPadFSM::GetText(SpReqAnsContext<PinPadService_GetInput_Req, Pi
 			}
 			
 		} else {
-			//Dbg("else[%s]", buf);
 		}
 		dwEnd = GetTickCount();
 		elapsed = dwEnd - dwStart;
@@ -1563,14 +1562,14 @@ int CPinPadFSM::LoadKeySM(SpReqAnsContext<PinPadService_LoadKeysSM_Req, PinPadSe
 	eErr = m_hDevHelper->LoadWorkingKey(wkParam1);
 	if (eErr != Error_Succeed)
 	{
-		Dbg("load working key 1(%d) failed(%d).",bSM,eErr);
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_USER)("load working key 1(%d) failed(%d).",bSM,eErr);
 		ctx->Ans.result = 1;
 		SetErrPackage(m_errPkg, "LoadKeySM::LoadWorkingKey 1", m_devSN, eErr, MEC_DEVAPI_EPP_LoadWorkingKey);
 		ctx->Answer(Error_Unexpect, AlarmDEC(m_errPkg));
 		m_bLoadKey = false;
 		return 0;
 	}
-	Dbg("Load working key1(%d) suc.",bSM);
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Load working key1(%d) suc.",bSM);
 
 	eErr = m_hDevHelper->LoadWorkingKey(wkParam2);
 	if (eErr != Error_Succeed)
@@ -1580,7 +1579,7 @@ int CPinPadFSM::LoadKeySM(SpReqAnsContext<PinPadService_LoadKeysSM_Req, PinPadSe
 		m_bLoadKey = false;
 		return 0;
 	}
-	Dbg("Load working key2(%d) suc.",bSM);
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_SYSTEM)("Load working key2(%d) suc.",bSM);
 	if (spConfig != NULL)
 	{
 		if (!bSM)