Skip to content

Commit

Permalink
Check that DEBUG level is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
violetagg committed May 21, 2024
1 parent aff8366 commit fd33748
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,9 @@ public NettyOutbound send(Publisher<? extends ByteBuf> source) {
return Mono.<Void>empty();
}

log.debug(format(channel(), "Dropped HTTP content, since response has been sent already: {}"), b);
if (log.isDebugEnabled()) {
log.debug(format(channel(), "Dropped HTTP content, since response has been sent already: {}"), b);
}
b.release();
return Mono.empty();
})
Expand Down Expand Up @@ -580,7 +582,9 @@ public NettyOutbound sendObject(Object message) {
sink.success();
}
else {
log.debug(format(channel(), "Dropped HTTP content, since response has been sent already: {}"), b);
if (log.isDebugEnabled()) {
log.debug(format(channel(), "Dropped HTTP content, since response has been sent already: {}"), b);
}
b.release();
sink.success();
}
Expand All @@ -597,7 +601,9 @@ public Mono<Void> send() {
sink.success();
}
else {
log.debug(format(channel(), "Response has been sent already."));
if (log.isDebugEnabled()) {
log.debug(format(channel(), "Response has been sent already."));
}
sink.success();
}
});
Expand Down

0 comments on commit fd33748

Please sign in to comment.