Skip to content

Commit ce2b98a

Browse files
authored
Make pending responses log messages consistent (#3239)
1 parent dca81cb commit ce2b98a

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

reactor-netty-http/src/main/java/reactor/netty/http/server/HttpTrafficHandler.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) {
165165
if (persistentConnection) {
166166
pendingResponses += 1;
167167
if (HttpServerOperations.log.isDebugEnabled()) {
168-
HttpServerOperations.log.debug(format(ctx.channel(), "Increasing pending responses, now {}"),
168+
HttpServerOperations.log.debug(format(ctx.channel(), "Increasing pending responses count: {}"),
169169
pendingResponses);
170170
}
171171
persistentConnection = isKeepAlive(request);
@@ -181,7 +181,7 @@ public void channelRead(ChannelHandlerContext ctx, Object msg) {
181181
if (pendingResponses > 1) {
182182
if (HttpServerOperations.log.isDebugEnabled()) {
183183
HttpServerOperations.log.debug(format(ctx.channel(), "Buffering pipelined HTTP request, " +
184-
"pending response count: {}, queue: {}"),
184+
"pending responses count: {}, queue: {}"),
185185
pendingResponses,
186186
pipelined != null ? pipelined.size() : 0);
187187
}
@@ -259,7 +259,7 @@ else if (persistentConnection && pendingResponses == 0) {
259259
else if (overflow) {
260260
if (HttpServerOperations.log.isDebugEnabled()) {
261261
HttpServerOperations.log.debug(format(ctx.channel(), "Buffering pipelined HTTP content, " +
262-
"pending response count: {}, pending pipeline:{}"),
262+
"pending responses count: {}, queue: {}"),
263263
pendingResponses,
264264
pipelined != null ? pipelined.size() : 0);
265265
}
@@ -327,7 +327,7 @@ public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise)
327327
if (!shouldKeepAlive()) {
328328
if (HttpServerOperations.log.isDebugEnabled()) {
329329
HttpServerOperations.log.debug(format(ctx.channel(), "Detected non persistent http " +
330-
"connection, preparing to close"),
330+
"connection, preparing to close. Pending responses count: {}"),
331331
pendingResponses);
332332
}
333333
ctx.write(msg, promise.unvoid())
@@ -347,15 +347,15 @@ public void write(ChannelHandlerContext ctx, Object msg, ChannelPromise promise)
347347
nonInformationalResponse = false;
348348
pendingResponses -= 1;
349349
if (HttpServerOperations.log.isDebugEnabled()) {
350-
HttpServerOperations.log.debug(format(ctx.channel(), "Decreasing pending responses, now {}"),
350+
HttpServerOperations.log.debug(format(ctx.channel(), "Decreasing pending responses count: {}"),
351351
pendingResponses);
352352
}
353353
}
354354

355355
if (pipelined != null && !pipelined.isEmpty()) {
356356
if (HttpServerOperations.log.isDebugEnabled()) {
357357
HttpServerOperations.log.debug(format(ctx.channel(), "Draining next pipelined " +
358-
"request, pending response count: {}, queued: {}"),
358+
"HTTP request, pending responses count: {}, queued: {}"),
359359
pendingResponses, pipelined.size());
360360
}
361361
ctx.executor()

0 commit comments

Comments
 (0)