瀏覽代碼

只改了一下日志

张洋 6 年之前
父節點
當前提交
ebbeb521b8

+ 2 - 1
lewaimai_pos_windows_server/network/CClientSession.cpp

@@ -85,7 +85,6 @@ void CClientSession::handle_read(const boost::system::error_code& error,
     {
         //读到客户端发过来的内容,进行绑定
         std::string msg = m_pos_message.data;
-		LOG_INFO("client handle read msg:" << msg.c_str());
 
         rapidjson::Document document;
         document.Parse(msg.c_str());
@@ -104,6 +103,8 @@ void CClientSession::handle_read(const boost::system::error_code& error,
 
 		if (is_login == "1")
 		{
+			LOG_INFO("get client login message:" << msg.c_str());
+
 			//获取到用户名了,进行绑定
 			m_server->BindUsername(username, this);
 

+ 3 - 3
lewaimai_pos_windows_server/network/CServer.cpp

@@ -445,7 +445,7 @@ void CServer::SendMessageToClient()
 		{
 			m_map_mutex.unlock();
 
-			LOG_INFO("can not find client, save to db, username:"<<username.c_str());
+			//LOG_INFO("can not find client, save to db, username:"<<username.c_str());
 
 			//客户端不在线,操作存数据库
 			AddMessageToDB(username, due_time, data);
@@ -460,7 +460,7 @@ void CServer::SendMessageToClient()
 			bool ret = session->send_message(data);
 			if (ret == false)
 			{
-				LOG_INFO("send to client fail, save it to db, username:" << username.c_str());
+				//LOG_INFO("send to client fail, save it to db, username:" << username.c_str());
 				//如果发送失败了,把消息存回到数据库
 				AddMessageToDB(username, due_time, data);
 			}
@@ -485,4 +485,4 @@ void CServer::HandleCleanupDueMessage()
 
 		CSystem::my_sleep(60 * 30);
 	}
-}
+}