Package io.netty.handler.codec.http2
Class Http2FrameLogger
- java.lang.Object
-
- io.netty.channel.ChannelHandlerAdapter
-
- io.netty.handler.codec.http2.Http2FrameLogger
-
- All Implemented Interfaces:
ChannelHandler
public class Http2FrameLogger extends ChannelHandlerAdapter
Logs HTTP2 frames for debugging purposes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Http2FrameLogger.Direction
-
Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler
ChannelHandler.Sharable
-
-
Field Summary
Fields Modifier and Type Field Description private static int
BUFFER_LENGTH_THRESHOLD
private InternalLogLevel
level
private InternalLogger
logger
-
Constructor Summary
Constructors Modifier Constructor Description Http2FrameLogger(LogLevel level)
Http2FrameLogger(LogLevel level, java.lang.Class<?> clazz)
Http2FrameLogger(LogLevel level, java.lang.String name)
private
Http2FrameLogger(InternalLogLevel level, InternalLogger logger)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private static InternalLogLevel
checkAndConvertLevel(LogLevel level)
boolean
isEnabled()
void
logData(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int streamId, ByteBuf data, int padding, boolean endStream)
void
logGoAway(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int lastStreamId, long errorCode, ByteBuf debugData)
void
logHeaders(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding, boolean endStream)
void
logHeaders(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency, short weight, boolean exclusive, int padding, boolean endStream)
void
logPing(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, long data)
void
logPingAck(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, long data)
void
logPriority(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int streamId, int streamDependency, short weight, boolean exclusive)
void
logPushPromise(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding)
void
logRstStream(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int streamId, long errorCode)
void
logSettings(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, Http2Settings settings)
void
logSettingsAck(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx)
void
logUnknownFrame(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, byte frameType, int streamId, Http2Flags flags, ByteBuf data)
void
logWindowsUpdate(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int streamId, int windowSizeIncrement)
private java.lang.String
toString(ByteBuf buf)
-
Methods inherited from class io.netty.channel.ChannelHandlerAdapter
ensureNotSharable, exceptionCaught, handlerAdded, handlerRemoved, isSharable
-
-
-
-
Field Detail
-
BUFFER_LENGTH_THRESHOLD
private static final int BUFFER_LENGTH_THRESHOLD
- See Also:
- Constant Field Values
-
logger
private final InternalLogger logger
-
level
private final InternalLogLevel level
-
-
Constructor Detail
-
Http2FrameLogger
public Http2FrameLogger(LogLevel level)
-
Http2FrameLogger
public Http2FrameLogger(LogLevel level, java.lang.String name)
-
Http2FrameLogger
public Http2FrameLogger(LogLevel level, java.lang.Class<?> clazz)
-
Http2FrameLogger
private Http2FrameLogger(InternalLogLevel level, InternalLogger logger)
-
-
Method Detail
-
checkAndConvertLevel
private static InternalLogLevel checkAndConvertLevel(LogLevel level)
-
isEnabled
public boolean isEnabled()
-
logData
public void logData(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int streamId, ByteBuf data, int padding, boolean endStream)
-
logHeaders
public void logHeaders(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int streamId, Http2Headers headers, int padding, boolean endStream)
-
logHeaders
public void logHeaders(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int streamId, Http2Headers headers, int streamDependency, short weight, boolean exclusive, int padding, boolean endStream)
-
logPriority
public void logPriority(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int streamId, int streamDependency, short weight, boolean exclusive)
-
logRstStream
public void logRstStream(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int streamId, long errorCode)
-
logSettingsAck
public void logSettingsAck(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx)
-
logSettings
public void logSettings(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, Http2Settings settings)
-
logPing
public void logPing(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, long data)
-
logPingAck
public void logPingAck(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, long data)
-
logPushPromise
public void logPushPromise(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int streamId, int promisedStreamId, Http2Headers headers, int padding)
-
logGoAway
public void logGoAway(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int lastStreamId, long errorCode, ByteBuf debugData)
-
logWindowsUpdate
public void logWindowsUpdate(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, int streamId, int windowSizeIncrement)
-
logUnknownFrame
public void logUnknownFrame(Http2FrameLogger.Direction direction, ChannelHandlerContext ctx, byte frameType, int streamId, Http2Flags flags, ByteBuf data)
-
toString
private java.lang.String toString(ByteBuf buf)
-
-