Kaynağa Gözat

用户评价

779513719 4 yıl önce
ebeveyn
işleme
9200c959d2

+ 4 - 0
jim-server/src/main/java/org/jim/server/command/handler/ChatReqHandler.java

@@ -13,6 +13,8 @@ import org.jim.common.utils.ChatKit;
 import org.jim.server.command.AbstractCmdHandler;
 import org.jim.server.command.handler.processor.chat.ChatCmdProcessor;
 import org.jim.server.command.handler.processor.chat.MsgQueueRunnable;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.tio.core.ChannelContext;
 
 import java.util.List;
@@ -23,6 +25,7 @@ import java.util.List;
  * @author : WChao 创建时间: 2017年9月22日 下午2:58:59
  */
 public class ChatReqHandler extends AbstractCmdHandler {
+	private static Logger log = LoggerFactory.getLogger(ChatReqHandler.class);
 
 	/**
 	 * 聊天命令处理器 处理方法
@@ -37,6 +40,7 @@ public class ChatReqHandler extends AbstractCmdHandler {
 			throw new Exception("body is null");
 		}
 		ChatBody chatBody = ChatKit.toChatBody(packet.getBody(),channelContext);
+		log.info("发送消息:"+chatBody.toJsonString());
 		packet.setBody(chatBody.toByte());
 		//聊天数据格式不正确
 		if(chatBody == null || chatBody.getChatType() == null){