Http2FrameLogger frame labels incorrect
Motivation: The labels identifying the frame types in Http2FrameLogger are not always correct. Modification: - Correct the string labels to indicate the right frame type in Http2FrameLogger Result: Logs are more correct.
This commit is contained in:
parent
918fde82f8
commit
0f8ecdcad5
@ -62,19 +62,19 @@ public class Http2FrameLogger extends ChannelHandlerAdapter {
|
|||||||
|
|
||||||
public void logData(Direction direction, ChannelHandlerContext ctx, int streamId, ByteBuf data, int padding,
|
public void logData(Direction direction, ChannelHandlerContext ctx, int streamId, ByteBuf data, int padding,
|
||||||
boolean endStream) {
|
boolean endStream) {
|
||||||
logger.log(level, "{} {} PRIORITY: streamId={} padding={} endStream={} length={} bytes={}", ctx.channel(),
|
logger.log(level, "{} {} DATA: streamId={} padding={} endStream={} length={} bytes={}", ctx.channel(),
|
||||||
direction.name(), streamId, padding, endStream, data.readableBytes(), toString(data));
|
direction.name(), streamId, padding, endStream, data.readableBytes(), toString(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void logHeaders(Direction direction, ChannelHandlerContext ctx, int streamId, Http2Headers headers,
|
public void logHeaders(Direction direction, ChannelHandlerContext ctx, int streamId, Http2Headers headers,
|
||||||
int padding, boolean endStream) {
|
int padding, boolean endStream) {
|
||||||
logger.log(level, "{} {} PRIORITY: streamId={} headers={} padding={} endStream={}", ctx.channel(),
|
logger.log(level, "{} {} HEADERS: streamId={} headers={} padding={} endStream={}", ctx.channel(),
|
||||||
direction.name(), streamId, headers, padding, endStream);
|
direction.name(), streamId, headers, padding, endStream);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void logHeaders(Direction direction, ChannelHandlerContext ctx, int streamId, Http2Headers headers,
|
public void logHeaders(Direction direction, ChannelHandlerContext ctx, int streamId, Http2Headers headers,
|
||||||
int streamDependency, short weight, boolean exclusive, int padding, boolean endStream) {
|
int streamDependency, short weight, boolean exclusive, int padding, boolean endStream) {
|
||||||
logger.log(level, "{} {} PRIORITY: streamId={} headers={} streamDependency={} weight={} exclusive={} " +
|
logger.log(level, "{} {} HEADERS: streamId={} headers={} streamDependency={} weight={} exclusive={} " +
|
||||||
"padding={} endStream={}", ctx.channel(),
|
"padding={} endStream={}", ctx.channel(),
|
||||||
direction.name(), streamId, headers, streamDependency, weight, exclusive, padding, endStream);
|
direction.name(), streamId, headers, streamDependency, weight, exclusive, padding, endStream);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user