hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1569325 - /httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpClientConnectionOperator.java
Date Tue, 18 Feb 2014 13:58:45 GMT
Author: olegk
Date: Tue Feb 18 13:58:44 2014
New Revision: 1569325

URL: http://svn.apache.org/r1569325
Log:
HTTPCLIENT-1462: include source port, host information in the debug level output

Modified:
    httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpClientConnectionOperator.java

Modified: httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpClientConnectionOperator.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpClientConnectionOperator.java?rev=1569325&r1=1569324&r2=1569325&view=diff
==============================================================================
--- httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpClientConnectionOperator.java
(original)
+++ httpcomponents/httpclient/trunk/httpclient/src/main/java/org/apache/http/impl/conn/DefaultHttpClientConnectionOperator.java
Tue Feb 18 13:58:44 2014
@@ -42,7 +42,6 @@ import org.apache.http.config.Lookup;
 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.HttpClientConnectionOperator;
 import org.apache.http.conn.HttpHostConnectException;
 import org.apache.http.conn.ManagedHttpClientConnection;
@@ -65,7 +64,7 @@ public class DefaultHttpClientConnection
 
     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;
@@ -133,6 +132,9 @@ public class DefaultHttpClientConnection
                     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) {



Mime
View raw message