code: private static String formatByteBufHolder(ChannelHandlerContext ctx, String eventName, ByteBufHolder msg) {
          String chStr = ctx.channel().toString();
          String msgStr = msg.toString();
          ByteBuf content = msg.content();
          int length = content.readableBytes();
          if (length == 0) {
              StringBuilder buf = new StringBuilder(chStr.length() + 1 + eventName.length() + 2 + msgStr.length() + 4);
              buf.append(chStr).append(' ').append(eventName).append(", ").append(msgStr).append(", 0B");
              return buf.toString();
          } else {
              int rows = length / 16 + (length % 15 == 0? 0 : 1) + 4;
              StringBuilder buf = new StringBuilder(
                      chStr.length() + 1 + eventName.length() + 2 + msgStr.length() + 2 + 10 + 1 + 2 + rows * 80);
  
              buf.append(chStr).append(' ').append(eventName).append(": ")
                 .append(msgStr).append(", ").append(length).append('B').append(NEWLINE);
              appendPrettyHexDump(buf, content);
  
              return buf.toString();
          }
      }
docs: Generates the default log message of the specified event whose argument is a {@link ByteBufHolder}.