瀏覽代碼

推送可以了

zhangyang 6 年之前
父節點
當前提交
9c5656fd13

二進制
bin/Win32/Debug/lewaimai_pos_windows/db/pos.db


二進制
bin/Win32/Debug/lewaimai_pos_windows/lewaimai_pos_windows.exe


二進制
bin/x64/Release/lewaimai_pos_windows_server_linux/lewaimai_pos_windows_server_linux


+ 8 - 7
lewaimai_pos_windows_server/helper/CAliyunMNS.cpp

@@ -19,18 +19,18 @@ CAliyunMNS::CAliyunMNS(std::string queueName)
     {
         queue = m_mnsClient->getQueueRef(queueName.c_str());
 
-        //LOG_ERROR("queueName:" << queueName.c_str());
-        //LOG_ERROR("endpoint:" << endpoint.c_str());
-        //LOG_ERROR("accessId:" << accessId.c_str());
-        //LOG_ERROR("accessKey:" << accessKey.c_str());
-        //LOG_ERROR("stsToken:" << stsToken.c_str());
+        LOG_ERROR("queueName:" << queueName.c_str());
+        LOG_ERROR("endpoint:" << endpoint.c_str());
+        LOG_ERROR("accessId:" << accessId.c_str());
+        LOG_ERROR("accessKey:" << accessKey.c_str());
+        LOG_ERROR("stsToken:" << stsToken.c_str());
 
         is_init = true;
     }
     catch(MNSServerException& me)
     {
         //cout << "Request Failed: " << me.GetErrorCode().c_str() << endl;
-        //LOG_INFO("Request Failed: " << me.GetErrorCode().c_str());
+        LOG_INFO("Request Failed: " << me.GetErrorCode().c_str());
         is_init = false;
 
         return;
@@ -38,7 +38,7 @@ CAliyunMNS::CAliyunMNS(std::string queueName)
     catch(MNSExceptionBase& mb)
     {
         //cout << "Request Failed: " << mb.ToString().c_str() << endl;
-        //LOG_INFO("Request Failed: " << mb.ToString().c_str());
+        LOG_INFO("Request Failed: " << mb.ToString().c_str());
         is_init = false;
 
         return;
@@ -57,6 +57,7 @@ std::string CAliyunMNS::getMessage()
 {
     if(is_init == false)
     {
+		LOG_INFO("is_init is false");
         return "error!";
     }
 

+ 2 - 1
lewaimai_pos_windows_server/network/CServer.cpp

@@ -344,10 +344,11 @@ void CServer::ReceiveMNSMessage()
         std::string message = mns.getMessage();
         if(message == "error!")
         {
+			LOG_INFO("message error!");
             continue;
         }
 
-        LOG_INFO("get new message:" << message.c_str());
+        //LOG_INFO("get new message:" << message.c_str());
 
         //获取到了新的消息,开始进行处理
         rapidjson::Document document;