tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1360618 - in /tomcat/trunk/java/org/apache/tomcat/jni/socket: AprSocket.java AprSocketContext.java
Date Thu, 12 Jul 2012 10:30:45 GMT
Author: markt
Date: Thu Jul 12 10:30:44 2012
New Revision: 1360618

URL: http://svn.apache.org/viewvc?rev=1360618&view=rev
Log:
Clean up debug logging

Modified:
    tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocket.java
    tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocketContext.java

Modified: tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocket.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocket.java?rev=1360618&r1=1360617&r2=1360618&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocket.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocket.java Thu Jul 12 10:30:44 2012
@@ -56,9 +56,10 @@ import org.apache.tomcat.jni.socket.AprS
  */
 public class AprSocket implements Runnable {
 
-    static final byte[][] NO_CERTS = new byte[0][];
+    private static final Logger log =
+            Logger.getLogger("org.apache.tomcat.jni.socket.AprSocket");
 
-    static Logger log = Logger.getLogger("AprSocket");
+    static final byte[][] NO_CERTS = new byte[0][];
 
     static int CONNECTING = 1;
     static int CONNECTED = 0x2;
@@ -280,7 +281,7 @@ public class AprSocket implements Runnab
                 updatePolling();
                 return rt;
             }
-            if (context.debug) {
+            if (log.isLoggable(Level.WARNING)) {
                 log.warning("apr.send(): Failed to send, closing " + sent);
             }
             reset();
@@ -407,7 +408,7 @@ public class AprSocket implements Runnab
             if (context.rawDataHandler != null) {
                 context.rawDataHandler.rawData(this, false, null, -1, -1, -1, true);
             }
-            if (context.debug) {
+            if (log.isLoggable(Level.FINE)) {
                 log.info("closing: context.open=" + context.open.get() + " " + this);
             }
 
@@ -725,7 +726,7 @@ public class AprSocket implements Runnab
                 try {
                     context.open.incrementAndGet();
 
-                    if (context.debug) {
+                    if (log.isLoggable(Level.FINE)) {
                         log.info("Accept: " + context.open.get() + " " + this + " " +
                                 getRemotePort());
                     }
@@ -795,7 +796,7 @@ public class AprSocket implements Runnab
         }
 
         try {
-            if (context.debug) {
+            if (log.isLoggable(Level.FINE)) {
                 log.info(this + " StartSSL");
             }
 
@@ -851,7 +852,7 @@ public class AprSocket implements Runnab
             int ticketLen = SSLExt.getTicket(socket, hostInfo.ticket);
             if (ticketLen > 0) {
                 hostInfo.ticketLen = ticketLen;
-                if (context.debug) {
+                if (log.isLoggable(Level.FINE)) {
                     log.info("Received ticket: " + ticketLen);
                 }
             }

Modified: tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocketContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocketContext.java?rev=1360618&r1=1360617&r2=1360618&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocketContext.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/jni/socket/AprSocketContext.java Thu Jul 12 10:30:44
2012
@@ -184,7 +184,6 @@ public class AprSocketContext {
     // Separate executor for connect/handshakes
     ExecutorService connectExecutor;
 
-    boolean debug = false;
     boolean debugSSL = false;
     boolean debugPoll = false;
 



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


Mime
View raw message