瀏覽代碼

Z991239-6255 #comment feat: 指纹仪规范日志

Signed-Off-By: commit-hook
刘文涛80174520 3 月之前
父節點
當前提交
73648875e2
共有 2 個文件被更改,包括 15 次插入15 次删除
  1. 12 12
      Module/mod_FingerPrint/FingerPrintFSM.h
  2. 3 3
      Module/mod_FingerPrint/mod_FingerPrint.h

+ 12 - 12
Module/mod_FingerPrint/FingerPrintFSM.h

@@ -67,7 +67,7 @@ public:
 	virtual void OnUnhandled()
 	{
 		if (ctx != NULL) {
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("ScanEvent unhandled.");
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA242H")("ScanEvent unhandled.");
 			ctx->Answer(Error_InvalidState);
 		}
 	}
@@ -83,7 +83,7 @@ public:
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("ScanEx unhandled");
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA242H")("ScanEx unhandled");
 			ctx->Answer(Error_InvalidState);
 		}
 	}
@@ -100,7 +100,7 @@ public:
 		if (ctx != NULL)
 		{
 			ctx->Answer(Error_InvalidState);
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("GetFinger unhandled");
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA242H")("GetFinger unhandled");
 		}
 	}
 };
@@ -116,7 +116,7 @@ public:
 		if (ctx != NULL)
 		{
 			ctx->Answer(Error_InvalidState);
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("GenerateTemplate unhandled.");
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA242H")("GenerateTemplate unhandled.");
 		}
 	}
 };
@@ -128,7 +128,7 @@ public:
 	virtual ~CancelRegisterEvent(){}
 	virtual void OnUnhandled()
 	{
-		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Cancel scan not handled");
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA242H")("Cancel scan not handled");
 	}
 };
 
@@ -143,7 +143,7 @@ public:
 		if (ctx != NULL)
 		{
 			ctx->Answer(Error_InvalidState);
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Match unhandled.");
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA242H")("Match unhandled.");
 		}
 	}
 };
@@ -158,7 +158,7 @@ public:
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Match finished unhandled.");
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA242H")("Match finished unhandled.");
 		}
 	}
 };
@@ -173,7 +173,7 @@ public:
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("GetFingerFinished unhandled.");
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA242H")("GetFingerFinished unhandled.");
 		}
 	}
 };
@@ -185,7 +185,7 @@ public:
 	virtual ~CancelMatchEvent(){}
 	virtual void OnUnhandled()
 	{
-		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("Cancel match not handled");
+		DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA242H")("Cancel match not handled");
 	}
 };
 
@@ -213,7 +213,7 @@ public:
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("GetFingerPrintJS unhandled");
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA242H")("GetFingerPrintJS unhandled");
 		}
 	}
 };
@@ -228,7 +228,7 @@ public:
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("GenerateTemplateJS unhandled.");
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA242H")("GenerateTemplateJS unhandled.");
 		}
 	}
 };
@@ -243,7 +243,7 @@ public:
 	{
 		if (ctx != NULL)
 		{
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("GenerateTemplateJS unhandled.");
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode("RTA242H")("GenerateTemplateJS unhandled.");
 		}
 	}
 };

+ 3 - 3
Module/mod_FingerPrint/mod_FingerPrint.h

@@ -200,7 +200,7 @@ public:
 			//不符合请求调用,告知具体错误流程
 			DWORD errCode = m_fsm.GetFsmStateErrCode();
 			CSimpleStringA stateName = m_fsm.GetCurrStateName();
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("GetFingerPrintJS req is unhandled ,CurrState=%d", stateName.GetData());
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(m_fsm.getRTACode(errCode))("GetFingerPrintJS req is unhandled ,CurrState=%d", stateName.GetData());
 			ctx->Answer(Error_Unexpect, errCode);
 		}
 		else {
@@ -220,7 +220,7 @@ public:
 			//不符合请求调用,告知具体错误流程
 			DWORD errCode = m_fsm.GetFsmStateErrCode();
 			CSimpleStringA stateName = m_fsm.GetCurrStateName();
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("GenerateTemplateJS req is unhandled ,CurrState=%d", stateName.GetData());
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(m_fsm.getRTACode(errCode))("GenerateTemplateJS req is unhandled ,CurrState=%d", stateName.GetData());
 			ctx->Answer(Error_Unexpect, errCode);
 		}
 		else {
@@ -240,7 +240,7 @@ public:
 			//不符合请求调用,告知具体错误流程
 			DWORD errCode = m_fsm.GetFsmStateErrCode();
 			CSimpleStringA stateName = m_fsm.GetCurrStateName();
-			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM)("CancelScanJS req is unhandled ,CurrState=%d", stateName.GetData());
+			DbgWithLink(LOG_LEVEL_WARN, LOG_TYPE_SYSTEM).setResultCode(m_fsm.getRTACode(errCode))("CancelScanJS req is unhandled ,CurrState=%d", stateName.GetData());
 			ctx->Answer(Error_Unexpect, errCode);
 		}
 		else {