Showing
1 changed file
with
1 additions
and
1 deletions
... | ... | @@ -156,7 +156,7 @@ public class TcpTransportHandler extends ChannelInboundHandlerAdapter implements |
156 | 156 | if (msg instanceof ByteBuf) { |
157 | 157 | ByteBuf message = (ByteBuf) msg; |
158 | 158 | byte[] byteMsg = ByteUtils.buf2Bytes(message); |
159 | - String msgStr = ByteUtils.getString(byteMsg, ByteUtils.UTF_8); | |
159 | + String msgStr = ByteUtils.bytesToHex(byteMsg); | |
160 | 160 | log.error("会话【{}】收到设备【{}】来自【{}】数据【{}】", sessionId, deviceSessionCtx.getDeviceId(), address, msgStr); |
161 | 161 | deviceSessionCtx.setChannel(ctx); |
162 | 162 | if (deviceSessionCtx.getDeviceInfo() == null || deviceSessionCtx.getDeviceProfile() == null) { | ... | ... |