Skip to content

Commit

Permalink
Http2FrameLogger frame labels incorrect
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Scottmitch committed Aug 7, 2017
1 parent 918fde8 commit 0f8ecdc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,19 +62,19 @@ private Http2FrameLogger(InternalLogLevel level, InternalLogger logger) {

public void logData(Direction direction, ChannelHandlerContext ctx, int streamId, ByteBuf data, int padding,
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));
}

public void logHeaders(Direction direction, ChannelHandlerContext ctx, int streamId, Http2Headers headers,
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);
}

public void logHeaders(Direction direction, ChannelHandlerContext ctx, int streamId, Http2Headers headers,
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(),
direction.name(), streamId, headers, streamDependency, weight, exclusive, padding, endStream);
}
Expand Down

0 comments on commit 0f8ecdc

Please sign in to comment.