Skip to content

Commit

Permalink
HTTPCLIENT-1462: include source port, host information in the debug l…
Browse files Browse the repository at this point in the history
…evel output

git-svn-id: https://svn.apache.org/repos/asf/httpcomponents/httpclient/branches/4.3.x@1569329 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
ok2c committed Feb 18, 2014
1 parent e16145d commit 338b0bd
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
import org.apache.http.config.SocketConfig;
import org.apache.http.conn.ConnectTimeoutException;
import org.apache.http.conn.DnsResolver;
import org.apache.http.conn.HttpClientConnectionManager;
import org.apache.http.conn.HttpHostConnectException;
import org.apache.http.conn.ManagedHttpClientConnection;
import org.apache.http.conn.SchemePortResolver;
Expand All @@ -57,7 +56,7 @@ class HttpClientConnectionOperator {

static final String SOCKET_FACTORY_REGISTRY = "http.socket-factory-registry";

private final Log log = LogFactory.getLog(HttpClientConnectionManager.class);
private final Log log = LogFactory.getLog(getClass());

private final Lookup<ConnectionSocketFactory> socketFactoryRegistry;
private final SchemePortResolver schemePortResolver;
Expand Down Expand Up @@ -124,6 +123,9 @@ public void connect(
sock.setSoLinger(linger > 0, linger);
}
conn.bind(sock);
if (this.log.isDebugEnabled()) {
this.log.debug("Connection established " + conn);
}
return;
} catch (final SocketTimeoutException ex) {
if (last) {
Expand Down

0 comments on commit 338b0bd

Please sign in to comment.