public void trace(Object message) { if (message instanceof String || this.logger.isTraceEnabled()) { this.logger.trace(String.valueOf(message)); } }
@Override protected void channelRead0(ChannelHandlerContext ctx, ByteBuf msg) throws Exception { if (sourceInputLog.isTraceEnabled()) { sourceInputLog.trace("Recv network data: {} bytes via input '{}' <{}> from remote address {}", msg.readableBytes(), sourceInputName, sourceInputId, ctx.channel().remoteAddress()); } } }
public void decode(ChannelHandlerContext ctx, ByteBuf msg, List<Object> out) throws IOException { logger.trace("Channel closed before decoding the message of {} bytes", msg.readableBytes()); msg.skipBytes(msg.readableBytes()); return; if(logger.isTraceEnabled()) { logger.trace("Trying to decrypt the encrypted message of size: {} with maxWrappedSize", msg.readableBytes()); msg.getBytes(msg.readerIndex(), lengthOctets.array(), 0, RpcConstants.LENGTH_FIELD_LENGTH); final int wrappedMsgLength = lengthOctets.getInt(0); msg.skipBytes(RpcConstants.LENGTH_FIELD_LENGTH); msg.getBytes(msg.readerIndex(), wrappedMsg, 0, wrappedMsgLength); if(logger.isTraceEnabled()) { logger.trace("Successfully decrypted incoming message. Length after decryption: {}", decodedMsg.length);
@Override public void decode(final ChannelHandlerContext ctx, final ByteBuf in, final List<Object> out) throws IOException, SAXException { if (in.isReadable()) { if (LOG.isTraceEnabled()) { LOG.trace("Received to decode: {}", ByteBufUtil.hexDump(in)); if (!isWhitespace(in.readByte())) { in.readerIndex(in.readerIndex() - 1); break; if (in.readerIndex() != 0 && LOG.isWarnEnabled()) { final byte[] strippedBytes = new byte[in.readerIndex()]; in.getBytes(0, strippedBytes, 0, in.readerIndex());
protected void decode(ChannelHandlerContext ctx, IsoTPMessage in, List<Object> out) { if (logger.isTraceEnabled()) { logger.trace("Got Data: {}", ByteBufUtil.hexDump(in.getUserData())); if (userData.readableBytes() == 0) { return; userData.readShort(); // Reserved (is always constant 0x0000) short tpduReference = userData.readShort(); short headerParametersLength = userData.readShort(); short userDataLength = userData.readShort(); byte errorClass = 0;
if (LOG.isTraceEnabled()) { LOG.trace("Found position {} beyond {}", recordStream.getCurrentPosition(), dlsn); if (LOG.isTraceEnabled()) { LOG.trace("Found position {} beyond {}", currTxId, txId); recordSetReader = LogRecordSet.of(record); } else { int length = in.readInt(); if (length < 0) { if (LOG.isTraceEnabled()) { LOG.trace("Skipped Record with TxId {} DLSN {}", currTxId, recordStream.getCurrentPosition());
public void trace(Object message, Throwable exception) { if (message instanceof String || this.logger.isTraceEnabled()) { this.logger.trace(String.valueOf(message), exception); } }
if (LOG.isTraceEnabled()) { LOG.trace("0x{} buf {}", Long.toHexString(sessionId), ByteBufUtil.hexDump(buf)); queuedBuffer = channel.alloc().buffer(buf.readableBytes()); if (LOG.isTraceEnabled()) { LOG.trace("0x{} queuedBuffer {}", Long.toHexString(sessionId), ByteBufUtil.hexDump(queuedBuffer)); if (LOG.isTraceEnabled()) { LOG.trace("Before copy {}", buf); queuedBuffer = channel.alloc().buffer(buf.readableBytes()); if (LOG.isTraceEnabled()) { LOG.trace("Copy is {}", queuedBuffer); LOG.trace("0x{} queuedBuffer {}",
@Override public void decode(final ChannelHandlerContext ctx, final ByteBuf in, final List<Object> out) throws IOException, SAXException { if (in.isReadable()) { if (LOG.isTraceEnabled()) { LOG.trace("Received to decode: {}", ByteBufUtil.hexDump(in)); if (!isWhitespace(in.readByte())) { in.readerIndex(in.readerIndex() - 1); break; if (in.readerIndex() != 0 && LOG.isWarnEnabled()) { final byte[] strippedBytes = new byte[in.readerIndex()]; in.getBytes(0, strippedBytes, 0, in.readerIndex());
if (component.readableBytes() > wrapSizeLimit) { throw new RpcException(String.format("Component Chunk size: %d is greater than the wrapSizeLimit: %d", component.readableBytes(), wrapSizeLimit)); component.getBytes(component.readerIndex(), origMsg, 0, component.readableBytes()); if(logger.isTraceEnabled()) { logger.trace("Trying to encrypt chunk of size:{} with wrapSizeLimit:{} and chunkMode: {}", component.readableBytes(), wrapSizeLimit); final byte[] wrappedMsg = saslCodec.wrap(origMsg, 0, component.readableBytes()); if(logger.isTraceEnabled()) { logger.trace("Successfully encrypted message, original size: {} Final Size: {}", component.readableBytes(), wrappedMsg.length);
synchronized public void setSessionClosing(long sessionId) { if (LOG.isTraceEnabled()) { LOG.trace("Session closing: 0x" + Long.toHexString(sessionId)); } SessionImpl s = sessionsById.get(sessionId); if (s == null) { return; } s.isClosing = true; }
while(message.isReadable() && !throttled.get()) { if (bb != null) { if (LOG.isTraceEnabled()) { LOG.trace("message readable {} bb len {} {}", message.readableBytes(), bb.remaining(), bb); ByteBuffer dat = bb.duplicate(); dat.flip(); LOG.trace("0x{} bb {}", Long.toHexString(sessionId), ByteBufUtil.hexDump(Unpooled.wrappedBuffer(dat))); if (LOG.isTraceEnabled()) { LOG.trace("after readBytes message readable {} bb len {} {}", message.readableBytes(), bb.remaining(), if (LOG.isTraceEnabled()) { LOG.trace("message readable {} bblenrem {}", message.readableBytes(), if (LOG.isTraceEnabled()) { LOG.trace("0x{} bbLen {}", Long.toHexString(sessionId), if (LOG.isTraceEnabled()) { LOG.trace("0x{} bbLen len is {}", Long.toHexString(sessionId),
@Override public void read(MysqlClientHandler handler, ByteBuf in) { int begin = in.readerIndex(); int index = in.readerIndex(); colCount = (int)BufferUtils.readLength(in); int readCnt = in.readerIndex() - index; int end = in.readerIndex(); if (_log.isTraceEnabled()) in.readerIndex(begin); in.readBytes(bytes); String dump = '\n' + UberUtil.hexDump(bytes); _log.trace("Packet Info:\n" + this.toString() + "\nRowsEventV2Packet packet:\n"
/** * Create a frame out of the {@link ByteBuf} and return it. * * @param ctx * the {@link ChannelHandlerContext} which this {@link ByteToMessageDecoder} belongs to * @param in * the {@link ByteBuf} from which to read data * @return frame the {@link ByteBuf} which represent the frame or {@code null} if no frame could be created. */ protected Object decode(ChannelHandlerContext ctx, ByteBuf in) throws Exception { if (LOG.isDebugEnabled()) { int readableBytes = in.readableBytes(); // int readableBytes = 1; LOG.trace("readableBytes={}", readableBytes); byte[] dst = new byte[readableBytes]; in.getBytes(in.readerIndex(), dst, 0, readableBytes); if (LOG.isTraceEnabled()) { LOG.trace("*decoder received : {}", new String(dst, CharsetUtil.UTF_8).replaceAll("\r\n", " ")); } } return receive(in); }
@Override void close() { try { if (LOG.isTraceEnabled()) { LOG.trace("Doing client selector close"); } selector.close(); if (LOG.isTraceEnabled()) { LOG.trace("Closed client selector"); } } catch (IOException e) { LOG.warn("Ignoring exception during selector close", e); } }
if (content.refCnt() == 0 || content.readableBytes() == 0) { if (LOG.isTraceEnabled()) { LOG.trace("Full HTTP response received an empty body"); } else if (!hasContentType && LOG.isTraceEnabled()) { LOG.trace("Missing or unknown Content-Type received from server.");
@Override public void read(MysqlClientHandler handler, ByteBuf in) { int begin = in.readerIndex(); in.readBytes(nullBitMap); int end = in.readerIndex(); if (_log.isTraceEnabled()) in.readerIndex(begin); byte[] bytes = new byte[end - begin]; in.readBytes(bytes); String dump = '\n' + UberUtil.hexDump(bytes); _log.trace("Packet Info:\n" + this.toString() + "\nTableMapPacket packet:\n"
@Override public URL getResource(String name) { URL url = null; for (ClassLoader classLoader : classLoaders) { url = classLoader.getResource(name); if (url != null) { break; } } if (url == null && LOG.isTraceEnabled()) { LOG.trace("Resource " + name + " not found."); } return url; }
@Nonnull @Override public Result addChunk(ByteBuf buf, SocketAddress remoteAddress) { if (buf.readableBytes() < 2) { if (LOG.isTraceEnabled()) { LOG.trace("Received V9 packet:\n{}", ByteBufUtil.prettyHexDump(buf)); LOG.trace("Incoming NetFlow V9 packet contains: {}", rawNetFlowV9Packet);
@Override public InputStream getResourceAsStream(String name) { InputStream stream = null; for (ClassLoader classLoader : classLoaders) { stream = classLoader.getResourceAsStream(name); if (stream != null) { break; } } if (stream == null && LOG.isTraceEnabled()) { LOG.trace("Resource " + name + " not found."); } return stream; }