hc-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1244222 - in /httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio: client/LoggingAsyncRequestExecutor.java conn/DefaultClientAsyncConnection.java
Date Tue, 14 Feb 2012 21:39:42 GMT
Author: olegk
Date: Tue Feb 14 21:39:42 2012
New Revision: 1244222

URL: http://svn.apache.org/viewvc?rev=1244222&view=rev
Log:
Tweaked logging output

Modified:
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/LoggingAsyncRequestExecutor.java
    httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnection.java

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/LoggingAsyncRequestExecutor.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/LoggingAsyncRequestExecutor.java?rev=1244222&r1=1244221&r2=1244222&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/LoggingAsyncRequestExecutor.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/client/LoggingAsyncRequestExecutor.java
Tue Feb 14 21:39:42 2012
@@ -94,9 +94,12 @@ class LoggingAsyncRequestExecutor extend
             final NHttpClientConnection conn,
             final ContentDecoder decoder) throws IOException {
         if (this.log.isDebugEnabled()) {
-            this.log.debug(conn + " Input ready " + decoder);
+            this.log.debug(conn + " Input ready");
         }
         super.inputReady(conn, decoder);
+        if (this.log.isDebugEnabled()) {
+            this.log.debug(conn + " " + decoder);
+        }
     }
 
     @Override
@@ -104,9 +107,12 @@ class LoggingAsyncRequestExecutor extend
             final NHttpClientConnection conn,
             final ContentEncoder encoder) throws IOException {
         if (this.log.isDebugEnabled()) {
-            this.log.debug(conn + " Output ready " + encoder);
+            this.log.debug(conn + " Output ready");
         }
         super.outputReady(conn, encoder);
+        if (this.log.isDebugEnabled()) {
+            this.log.debug(conn + " " + encoder);
+        }
     }
 
     @Override

Modified: httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnection.java
URL: http://svn.apache.org/viewvc/httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnection.java?rev=1244222&r1=1244221&r2=1244222&view=diff
==============================================================================
--- httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnection.java
(original)
+++ httpcomponents/httpasyncclient/trunk/httpasyncclient/src/main/java/org/apache/http/impl/nio/conn/DefaultClientAsyncConnection.java
Tue Feb 14 21:39:42 2012
@@ -103,6 +103,9 @@ public class DefaultClientAsyncConnectio
         switch (this.status) {
         case ACTIVE:
             buf.append("ACTIVE");
+            if (this.inbuf.hasData()) {
+                buf.append("(").append(this.inbuf.length()).append(")");
+            }
             break;
         case CLOSING:
             buf.append("CLOSING");



Mime
View raw message