Browse Source

feat(session): 为CSDJ协议帧处理添加类型日志打印

为每个帧类型的处理分支增加接收日志,同时为未知帧日志添加上CSDJ标识,方便日志排查
zhc
zhczyx@163.com 1 month ago
parent
commit
e4cd975149
  1. 9
      src/main/java/com/aeon/tcp/csdj/session/CsdjSession.java

9
src/main/java/com/aeon/tcp/csdj/session/CsdjSession.java

@ -118,28 +118,35 @@ public class CsdjSession implements AutoCloseable {
switch (id) { switch (id) {
case ID_PASSWORD: case ID_PASSWORD:
log.info("[CSDJ] Received frame type: ID_PASSWORD");
handleIdPassword(frame); handleIdPassword(frame);
break; break;
case ID_PASSWORD_ACK: case ID_PASSWORD_ACK:
log.info("[CSDJ] Received frame type: ID_PASSWORD_ACK");
handleIdPasswordAck(frame); handleIdPasswordAck(frame);
break; break;
case NEW_MESSAGE_SEND_READY: case NEW_MESSAGE_SEND_READY:
log.info("[CSDJ] Received frame type: NEW_MESSAGE_SEND_READY");
handleNmsr(frame); handleNmsr(frame);
break; break;
case INFORMATION: case INFORMATION:
log.info("[CSDJ] Received frame type: INFORMATION");
handleInformation(frame); handleInformation(frame);
break; break;
case RECEIVE_READY: case RECEIVE_READY:
log.info("[CSDJ] Received frame type: RECEIVE_READY");
handleRr(frame); handleRr(frame);
break; break;
case DISCONNECT: case DISCONNECT:
log.info("[CSDJ] Received frame type: DISCONNECT");
handleDisc(frame); handleDisc(frame);
break; break;
case DISCONNECT_ACK: case DISCONNECT_ACK:
log.info("[CSDJ] Received frame type: DISCONNECT_ACK");
handleDiscAck(frame); handleDiscAck(frame);
break; break;
default: default:
log.warn("Unknown frame: {}", id); log.warn("[CSDJ] Unknown frame: {}", id);
} }
} }

Loading…
Cancel
Save