From aa9a1242676b73611b29e06e816df8d474aeb3a3 Mon Sep 17 00:00:00 2001 From: "autumn.g@foxmail.com" Date: Tue, 19 Mar 2024 16:34:35 +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 --- .../pile/service/impl/YKCPushCommandServiceImpl.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/YKCPushCommandServiceImpl.java b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/YKCPushCommandServiceImpl.java index cc03535c5..a611c1d22 100644 --- a/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/YKCPushCommandServiceImpl.java +++ b/jsowell-pile/src/main/java/com/jsowell/pile/service/impl/YKCPushCommandServiceImpl.java @@ -101,19 +101,20 @@ public class YKCPushCommandServiceImpl implements YKCPushCommandService { byte[] writeMsg = Bytes.concat(head, length, temp, crc); // 返回完整的报文 string类型 String wholeMsg= BytesUtil.binary(writeMsg, 16); - log.info("[" + channel.remoteAddress() + "] 主动发送push请求信息:{}", wholeMsg); + // log.info("[" + channel.remoteAddress() + "] 主动发送push请求信息:{}", wholeMsg); ByteBuf byteBuf = channel.alloc().buffer().writeBytes(writeMsg); ChannelFuture channelFuture = channel.writeAndFlush(byteBuf); channelFuture.addListener((ChannelFutureListener) channelFutureListener -> { // 检查操作的状态 if (channelFutureListener.isSuccess()) { - log.info("push结果【成功】, remoteAddress:{}, channelId:{}, 帧类型:{}, 报文:{}", channel.remoteAddress(), channel.id(), value, wholeMsg); + log.info("push结果【成功】, pileSn:{}, remoteAddress:{}, channelId:{}, 帧类型:{}, 报文:{}", + pileSn, channel.remoteAddress(), channel.id(), value, wholeMsg); } else { // 如果发生错误,则访问描述原因的Throwable Throwable cause = channelFutureListener.cause(); - // cause.printStackTrace(); - log.info("push结果【失败】, remoteAddress:{}, channelId:{}, 帧类型:{}, 报文:{}", channel.remoteAddress(), channel.id(), value, wholeMsg); - log.error("push发送命令失败", cause); + log.info("push结果【失败】, pileSn:{}, remoteAddress:{}, channelId:{}, 帧类型:{}, 报文:{}", + pileSn, channel.remoteAddress(), channel.id(), value, wholeMsg); + log.error("push发送命令失败, pileSn:{}", pileSn, cause); } });