update 打印日志

This commit is contained in:
2024-03-18 16:39:37 +08:00
parent ca5a5d3593
commit 95e74d6d73
5 changed files with 22 additions and 10 deletions

View File

@@ -570,8 +570,6 @@ public class TransactionRecordsRequestHandler extends AbstractHandler {
}
}
/*
应答
确认结果 0x00 上传成功 0x01 非法账单

View File

@@ -17,7 +17,6 @@ import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.xml.bind.DatatypeConverter;
import java.net.InetSocketAddress;
import java.util.List;
import java.util.Objects;
@@ -80,13 +79,16 @@ public class NettyServerHandler extends ChannelInboundHandlerAdapter {
Channel channel = ctx.channel();
// new
String hexString = DatatypeConverter.printHexBinary(msg);
// String hexString = DatatypeConverter.printHexBinary(msg);
// 心跳包0x03日志太多造成日志文件过大改为不打印
if (!CollectionUtils.containsAny(notPrintFrameTypeList, frameType)) {
log.info("【<<<<<平台收到消息<<<<<】channel:{}, 帧类型:{}, 帧名称:{}, 序列号域:{}, 报文:{}, new报文:{}",
// log.info("【<<<<<平台收到消息<<<<<】channel:{}, 帧类型:{}, 帧名称:{}, 序列号域:{}, 报文:{}, new报文:{}",
// channel.id(), frameType, YKCFrameTypeCode.getFrameTypeStr(frameType), serialNumber,
// BytesUtil.binary(msg, 16), hexString);
log.info("【<<<<<平台收到消息<<<<<】channel:{}, 帧类型:{}, 帧名称:{}, 序列号域:{}, 报文:{}",
channel.id(), frameType, YKCFrameTypeCode.getFrameTypeStr(frameType), serialNumber,
BytesUtil.binary(msg, 16), hexString);
BytesUtil.binary(msg, 16));
}
// 处理数据