Browse Source

日志调整

master
lijw 9 months ago
parent
commit
9f6fcdb2cd
1 changed files with 10 additions and 2 deletions
  1. +10
    -2
      src/main/java/com/inspect/tcpserver/tcp/NettyServer.java

+ 10
- 2
src/main/java/com/inspect/tcpserver/tcp/NettyServer.java View File

@ -205,14 +205,22 @@ public class NettyServer {
command = Integer.parseInt(root.element("Command").getText());
}
logger.info(Color.MAGENTA + "######## <= 会话: {}, 客户: {}, 消息类型: {}, 命令:{}, 消息体: ########\n{}" + Color.END, binaryModel.uuid, binaryModel.id, type, command, xml);
// logger.info(Color.MAGENTA + "######## <= 会话: {}, 客户: {}, 消息类型: {}, 命令:{}, 消息体: ########\n{}" + Color.END, binaryModel.uuid, binaryModel.id, type, command, xml);
//判断是否重发
if (type == SystemType.system) {
if (command == SystemType.has_response || command == SystemType.no_response) {
if (null != root.element("Code")) {
if (root.element("Code").getText() == ResponseType.retry) {
String code = root.element("Code").getText();
if (code.equals(ResponseType.retry)) {
resetSendMsg(binaryModel.receiveIndex, sendCode);
} else if (code.equals(ResponseType.succeed)) {
logger.info("######## 响应结果为成功, 客户: {}, 命令: {}, 消息体 ########\n{}", binaryModel.id, command, xml);
} else if (code.equals(ResponseType.fault)) {
logger.warn("######## 响应结果为失败, 客户: {}, 命令: {}, 消息体 ########\n{}", binaryModel.id, command, xml);
} else if (code.equals(ResponseType.reject)) {
logger.warn("######## 响应结果为拒绝, 客户: {}, 命令: {}, 消息体 ########\n{}", binaryModel.id, command, xml);
}
return;
}
}
}


Loading…
Cancel
Save