浏览代码

#IQRV #comment CenterSetting&DeviceControl添加LogCode,为接下来下线实体做准备

80374374 11 月之前
父节点
当前提交
75991acf30
共有 2 个文件被更改,包括 22 次插入3 次删除
  1. 3 3
      Module/mod_CenterSetting/mod_centersetting.h
  2. 19 0
      Module/mod_DeviceControl/mod_DeviceControl.cpp

+ 3 - 3
Module/mod_CenterSetting/mod_centersetting.h

@@ -78,7 +78,7 @@ public:
 	virtual void Handle_Downloadv2(SpReqAnsContext<CenterSettingService_Downloadv2_Req, CenterSettingService_Downloadv2_Ans>::Pointer ctx)
 	{
 		DbgToBeidou(ctx->link, __FUNCTION__)();
-		DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("DownloadCenterSetting")("Handle_Download");
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(CenterSettingService_LogCode_Downloadv2).setAPI(__FUNCTION__)(__FUNCTION__);
 		m_pEntity->DownloadCenterSetting(ctx);
 	}
 
@@ -86,7 +86,7 @@ public:
 	virtual void Handle_GetAccessUrl(SpReqAnsContext<CenterSettingService_GetAccessUrl_Req, CenterSettingService_GetAccessUrl_Ans>::Pointer ctx)
 	{
 		DbgToBeidou(ctx->link, __FUNCTION__)();
-		DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("GetAccessUrl")("Handle_GetAccessUrl");
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(CenterSettingService_LogCode_GetAccessUrl).setAPI(__FUNCTION__)(__FUNCTION__);
 		auto rc = m_pEntity->GetAccessUrl(ctx->Ans.HostUrl); //获取初始化地址,是的,就是初始化地址,不要在意这里的名称问题,之前同事开发接口的时候估计随手一打
 		ctx->Answer(rc);
 	}
@@ -94,7 +94,7 @@ public:
 	virtual void Handle_GetCertainAceessUrl(SpReqAnsContext<CenterSettingService_GetCertainAceessUrl_Req, CenterSettingService_GetCertainAceessUrl_Ans>::Pointer ctx)
 	{
 		DbgToBeidou(ctx->link, __FUNCTION__)();
-		DbgWithLink(LOG_LEVEL_INFO, ctx->link.checkEmpty() ? LOG_TYPE_SYSTEM : LOG_TYPE_USER).setAPI("GetAccessHostUrl")("Handle_GetAccessHostUrl");
+		DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(CenterSettingService_LogCode_GetCertainAceessUrl).setAPI(__FUNCTION__)(__FUNCTION__);
 		auto rc = m_pEntity->GetCertainAceessUrl(ctx->Req.reqName, ctx->Ans.CertainAceessUrl); //获取准入地址,这个接口是后面加的
 		ctx->Answer(rc);
 	}

+ 19 - 0
Module/mod_DeviceControl/mod_DeviceControl.cpp

@@ -35,61 +35,80 @@
 void CDeviceControlServerSession::Handle_USB(SpReqAnsContext<DeviceControlService_USB_Req, DeviceControlService_USB_Ans>::Pointer ctx)
 {
     DbgToBeidou(ctx->link, __FUNCTION__)();
+    DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(DeviceControlService_LogCode_USB).setAPI(__FUNCTION__)(__FUNCTION__);
     m_pEntity->USB(ctx);
 }
 void CDeviceControlServerSession::Handle_GetUkeyID(SpReqAnsContext<DeviceControlService_GetUkeyID_Req, DeviceControlService_GetUkeyID_Ans>::Pointer ctx)
 {
     DbgToBeidou(ctx->link, __FUNCTION__)();
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(DeviceControlService_LogCode_GetUkeyID).setAPI(__FUNCTION__)(__FUNCTION__);
     m_pEntity->GetUkeyID(ctx);
 }
 void CDeviceControlServerSession::Handle_InitToken(SpReqAnsContext<DeviceControlService_InitToken_Req, DeviceControlService_InitToken_Ans>::Pointer ctx)
 {
     DbgToBeidou(ctx->link, __FUNCTION__)();
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(DeviceControlService_LogCode_InitToken).setAPI(__FUNCTION__)(__FUNCTION__);
     m_pEntity->InitToken(ctx);
 }
 void CDeviceControlServerSession::Handle_QueryUSBStatus(SpReqAnsContext<DeviceControlService_QueryUSBStatus_Req, DeviceControlService_QueryUSBStatus_Ans>::Pointer ctx)
 {
     DbgToBeidou(ctx->link, __FUNCTION__)();
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(DeviceControlService_LogCode_QueryUSBStatus).setAPI(__FUNCTION__)(__FUNCTION__);
+
     m_pEntity->QueryUSBStatus(ctx);
 }
 void CDeviceControlServerSession::Handle_QueryHardwareInfo(SpReqAnsContext<DeviceControlService_QueryHardwareInfo_Req, DeviceControlService_QueryHardwareInfo_Ans>::Pointer ctx)
 {
     DbgToBeidou(ctx->link, __FUNCTION__)();
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(DeviceControlService_LogCode_QueryHardwareInfo).setAPI(__FUNCTION__)(__FUNCTION__);
+
     m_pEntity->QueryHardwareInfo(ctx);
 }
 void CDeviceControlServerSession::Handle_ReadCenterConfigStr(SpReqAnsContext<DeviceControlService_ReadCenterConfigStr_Req, DeviceControlService_ReadCenterConfigStr_Ans>::Pointer ctx)
 {
     DbgToBeidou(ctx->link, __FUNCTION__)();
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(DeviceControlService_LogCode_ReadCenterConfigStr).setAPI(__FUNCTION__)(__FUNCTION__);
+
     m_pEntity->ReadCenterConfigStr(ctx);
 }
 
 void CDeviceControlServerSession::Handle_ReadConfigValue(SpReqAnsContext<DeviceControlService_ReadConfigValue_Req, DeviceControlService_ReadConfigValue_Ans>::Pointer ctx)
 {
     DbgToBeidou(ctx->link, __FUNCTION__)();
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(DeviceControlService_LogCode_ReadConfigValue).setAPI(__FUNCTION__)(__FUNCTION__);
+
     m_pEntity->ReadConfigValue(ctx);
 }
 
 void CDeviceControlServerSession::Handle_GetDevInfo(SpReqAnsContext<DeviceControlService_GetDevInfo_Req, DeviceControlService_GetDevInfo_Ans>::Pointer ctx)
 {
     DbgToBeidou(ctx->link, __FUNCTION__)();
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(DeviceControlService_LogCode_GetDevInfo).setAPI(__FUNCTION__)(__FUNCTION__);
+
     m_pEntity->GetDevInfo(ctx);
 }
 
 void CDeviceControlServerSession::Handle_TestConnectivity(SpReqAnsContext<DeviceControlService_TestConnectivity_Req, DeviceControlService_TestConnectivity_Ans>::Pointer ctx)
 {
     DbgToBeidou(ctx->link, __FUNCTION__)();
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(DeviceControlService_LogCode_TestConnectivity).setAPI(__FUNCTION__)(__FUNCTION__);
+
     m_pEntity->TestConnectivity(ctx);
 }
 
 void CDeviceControlServerSession::Handle_GetVendorFileList(SpReqAnsContext<DeviceControlService_GetVendorFileList_Req, DeviceControlService_GetVendorFileList_Ans>::Pointer ctx)
 {
     DbgToBeidou(ctx->link, __FUNCTION__)();
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(DeviceControlService_LogCode_GetVendorFileList).setAPI(__FUNCTION__)(__FUNCTION__);
+
     m_pEntity->GetVendorFileList(ctx);
 }
 
 void CDeviceControlServerSession::Handle_TestAdapterFileAvailable(SpReqAnsContext<DeviceControlService_TestAdapterFileAvailable_Req, DeviceControlService_TestAdapterFileAvailable_Ans>::Pointer ctx)
 {
     DbgToBeidou(ctx->link, __FUNCTION__)();
+	DbgWithLink(LOG_LEVEL_INFO, LOG_TYPE_USER).setLogCode(DeviceControlService_LogCode_TestAdapterFileAvailable).setAPI(__FUNCTION__)(__FUNCTION__);
+
     m_pEntity->TestAdapterFileAvailable(ctx);
 }