From 2b034813527d58d9b37a52824ac9c56789905e96 Mon Sep 17 00:00:00 2001 From: Violeta Georgieva Date: Mon, 20 May 2024 11:00:53 +0300 Subject: [PATCH] Check that DEBUG level is enabled --- .../netty/http/server/HttpServerOperations.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/reactor-netty-http/src/main/java/reactor/netty/http/server/HttpServerOperations.java b/reactor-netty-http/src/main/java/reactor/netty/http/server/HttpServerOperations.java index dbdc2d3722..116a6e8cc8 100644 --- a/reactor-netty-http/src/main/java/reactor/netty/http/server/HttpServerOperations.java +++ b/reactor-netty-http/src/main/java/reactor/netty/http/server/HttpServerOperations.java @@ -543,7 +543,9 @@ public NettyOutbound send(Publisher source) { return Mono.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(); }) @@ -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(); } @@ -597,7 +601,9 @@ public Mono 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(); } });