From b633fe9dd7e03c07933fb080942e1a414cc51577 Mon Sep 17 00:00:00 2001 From: "autumn.g@foxmail.com" Date: Fri, 15 Dec 2023 16:26:37 +0800 Subject: [PATCH] =?UTF-8?q?update=20=E6=89=93=E5=8D=B0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../netty/server/yunkuaichong/NettyServerHandler.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/jsowell-netty/src/main/java/com/jsowell/netty/server/yunkuaichong/NettyServerHandler.java b/jsowell-netty/src/main/java/com/jsowell/netty/server/yunkuaichong/NettyServerHandler.java index 2a6ff938f..8ef34c973 100644 --- a/jsowell-netty/src/main/java/com/jsowell/netty/server/yunkuaichong/NettyServerHandler.java +++ b/jsowell-netty/src/main/java/com/jsowell/netty/server/yunkuaichong/NettyServerHandler.java @@ -8,11 +8,7 @@ import com.jsowell.common.util.StringUtils; import com.jsowell.common.util.YKCUtils; import com.jsowell.netty.service.yunkuaichong.YKCBusinessService; import io.netty.buffer.ByteBuf; -import io.netty.channel.Channel; -import io.netty.channel.ChannelHandler; -import io.netty.channel.ChannelHandlerContext; -import io.netty.channel.ChannelId; -import io.netty.channel.ChannelInboundHandlerAdapter; +import io.netty.channel.*; import io.netty.handler.timeout.IdleState; import io.netty.handler.timeout.IdleStateEvent; import io.netty.handler.timeout.ReadTimeoutException; @@ -23,7 +19,6 @@ import org.springframework.stereotype.Component; import javax.xml.bind.DatatypeConverter; import java.net.InetSocketAddress; -import java.util.Arrays; import java.util.List; import java.util.Objects; import java.util.concurrent.ConcurrentHashMap; @@ -85,9 +80,9 @@ public class NettyServerHandler extends ChannelInboundHandlerAdapter { // 心跳包0x03日志太多,造成日志文件过大,改为不打印 if (!CollectionUtils.containsAny(notPrintFrameTypeList, frameType)) { - log.info("【<<<<<平台收到消息<<<<<】channel:{}, 帧类型:{}, 帧名称:{}, 序列号域:{}, 报文:{}, new报文:{}, msg:{}", + log.info("【<<<<<平台收到消息<<<<<】channel:{}, 帧类型:{}, 帧名称:{}, 序列号域:{}, 报文:{}, new报文:{}", ctx.channel().id(), frameType, YKCFrameTypeCode.getFrameTypeStr(frameType), serialNumber, - BytesUtil.binary(arr, 16), hexString, Arrays.toString(arr)); + BytesUtil.binary(arr, 16), hexString); } // 处理数据