Author: markt
Date: Sun Nov 23 22:50:00 2014
New Revision: 1641273

URL: http://svn.apache.org/r1641273
Log:
Additional debug messages.

Modified:
    tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java

Modified: tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java?rev=1641273&r1=1641272&r2=1641273&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/util/net/Nio2Endpoint.java Sun Nov 23 
22:50:00 2014
@@ -755,6 +755,9 @@ public class Nio2Endpoint extends Abstra
                 @Override
                 public void completed(Integer nBytes, 
SocketWrapperBase<Nio2Channel> attachment) {
                     boolean notify = false;
+                    if (log.isDebugEnabled()) {
+                        log.debug("Socket: [ + " + attachment + "], Interest: 
[" + interest + "]");
+                    }
                     synchronized (readCompletionHandler) {
                         if (nBytes.intValue() < 0) {
                             failed(new EOFException(), attachment);
@@ -879,8 +882,15 @@ public class Nio2Endpoint extends Abstra
         @Override
         public int read(boolean block, byte[] b, int off, int len) throws 
IOException {
 
+            if (log.isDebugEnabled()) {
+                log.debug("Socket: [" + this + "], block: [" + block + "], 
length: [" + len + "]");
+            }
+
             synchronized (readCompletionHandler) {
                 if (readPending) {
+                    if (log.isDebugEnabled()) {
+                        log.debug("Socket: [" + this + "], Read: [0]");
+                    }
                     return 0;
                 }
 
@@ -894,6 +904,9 @@ public class Nio2Endpoint extends Abstra
                 // Is there enough data in the read buffer to satisfy this 
request?
                 if (remaining >= len) {
                     readBuffer.get(b, off, len);
+                    if (log.isDebugEnabled()) {
+                        log.debug("Socket: [" + this + "], Read from buffer: 
[" + len + "]");
+                    }
                     return len;
                 }
 
@@ -936,6 +949,10 @@ public class Nio2Endpoint extends Abstra
                     throw new EOFException();
                 }
 
+                if (log.isDebugEnabled()) {
+                    log.debug("Socket: [" + this + "], Read: [" + (len - 
leftToWrite) + "]");
+                }
+
                 return len - leftToWrite;
             }
         }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to