diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/ConnectionPool.java b/jetty-client/src/main/java/org/eclipse/jetty/client/ConnectionPool.java index 49d1c650ac5..53fe5ae2e01 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/ConnectionPool.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/ConnectionPool.java @@ -236,6 +236,11 @@ public class ConnectionPool implements Closeable, Dumpable @Override public String toString() { - return String.format("%s %d/%d", getClass().getSimpleName(), connectionCount.get(), maxConnections); + return String.format("%s[c=%d/%d,a=%d,i=%d]", + getClass().getSimpleName(), + connectionCount.get(), + maxConnections, + activeConnections.size(), + idleConnections.size()); } } diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java index c539e78d4a3..45e3878b388 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/HttpDestination.java @@ -176,7 +176,7 @@ public abstract class HttpDestination implements Destination, Closeable, Dumpabl else { if (LOG.isDebugEnabled()) - LOG.debug("Queued {}", request); + LOG.debug("Queued {} for {}", request, this); requestNotifier.notifyQueued(request); send(); } @@ -184,7 +184,7 @@ public abstract class HttpDestination implements Destination, Closeable, Dumpabl else { if (LOG.isDebugEnabled()) - LOG.debug("Max queue size {} exceeded by {}", client.getMaxRequestsQueuedPerDestination(), request); + LOG.debug("Max queue size {} exceeded by {} for {}", client.getMaxRequestsQueuedPerDestination(), request, this); request.abort(new RejectedExecutionException("Max requests per destination " + client.getMaxRequestsQueuedPerDestination() + " exceeded for " + this)); } } @@ -258,9 +258,10 @@ public abstract class HttpDestination implements Destination, Closeable, Dumpabl @Override public String toString() { - return String.format("%s(%s)%s", + return String.format("%s[%s]%s,queue=%d", HttpDestination.class.getSimpleName(), asString(), - proxy == null ? "" : " via " + proxy); + proxy == null ? "" : "(via " + proxy + ")", + exchanges.size()); } } diff --git a/jetty-client/src/main/java/org/eclipse/jetty/client/PoolingHttpDestination.java b/jetty-client/src/main/java/org/eclipse/jetty/client/PoolingHttpDestination.java index 17f780b85d2..2803276a464 100644 --- a/jetty-client/src/main/java/org/eclipse/jetty/client/PoolingHttpDestination.java +++ b/jetty-client/src/main/java/org/eclipse/jetty/client/PoolingHttpDestination.java @@ -94,7 +94,7 @@ public abstract class PoolingHttpDestination extends HttpD HttpClient client = getHttpClient(); final HttpExchange exchange = getHttpExchanges().poll(); if (LOG.isDebugEnabled()) - LOG.debug("Processing exchange {} on connection {}", exchange, connection); + LOG.debug("Processing exchange {} on {} of {}", exchange, connection, this); if (exchange == null) { if (!connectionPool.release(connection)) @@ -213,4 +213,10 @@ public abstract class PoolingHttpDestination extends HttpD { ContainerLifeCycle.dump(out, indent, Arrays.asList(connectionPool)); } + + @Override + public String toString() + { + return String.format("%s,pool=%s", super.toString(), connectionPool); + } }