Skip to content

Commit 0e9ec89

Browse files
committed
clean up logs
1 parent a07ac57 commit 0e9ec89

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

client/src/main/java/org/asynchttpclient/netty/request/NettyRequestSender.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,10 @@ private <T> ListenableFuture<T> sendRequestWithOpenChannel(Request request, Prox
217217
future.setChannelState(ChannelState.POOLED);
218218
future.attachChannel(channel, false);
219219

220-
LOGGER.debug("Using open Channel {} for {} '{}'", channel, future.getNettyRequest().getHttpRequest().getMethod(), future.getNettyRequest().getHttpRequest().getUri());
220+
if (LOGGER.isDebugEnabled()) {
221+
HttpRequest httpRequest = future.getNettyRequest().getHttpRequest();
222+
LOGGER.debug("Using open Channel {} for {} '{}'", channel, httpRequest.getMethod(), httpRequest.getUri());
223+
}
221224

222225
// channelInactive might be called between isChannelValid and writeRequest
223226
// so if we don't store the Future now, channelInactive won't perform handleUnexpectedClosedChannel

0 commit comments

Comments
 (0)