cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From clecl...@apache.org
Subject svn commit: r895497 - /cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
Date Sun, 03 Jan 2010 22:32:53 GMT
Author: cleclerc
Date: Sun Jan  3 22:32:53 2010
New Revision: 895497

URL: http://svn.apache.org/viewvc?rev=895497&view=rev
Log:
Add guards to logger calls to prevent unnecessary strings concatenations

Modified:
    cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java

Modified: cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java?rev=895497&r1=895496&r2=895497&view=diff
==============================================================================
--- cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
(original)
+++ cxf/trunk/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/interceptor/JAXRSInInterceptor.java
Sun Jan  3 22:32:53 2010
@@ -21,6 +21,7 @@
 
 import java.util.List;
 import java.util.ResourceBundle;
+import java.util.logging.Level;
 import java.util.logging.Logger;
 
 import javax.ws.rs.WebApplicationException;
@@ -191,13 +192,14 @@
             }
         }
 
-        
-        LOG.fine("Request path is: " + rawPath);
-        LOG.fine("Request HTTP method is: " + httpMethod);
-        LOG.fine("Request contentType is: " + requestContentType);
-        LOG.fine("Accept contentType is: " + acceptTypes);
-        
-        LOG.fine("Found operation: " + ori.getMethodToInvoke().getName());
+        if (LOG.isLoggable(Level.FINE)) {
+            LOG.fine("Request path is: " + rawPath);
+            LOG.fine("Request HTTP method is: " + httpMethod);
+            LOG.fine("Request contentType is: " + requestContentType);
+            LOG.fine("Accept contentType is: " + acceptTypes);
+
+            LOG.fine("Found operation: " + ori.getMethodToInvoke().getName());
+        }
         setMessageProperties(message, ori, values, resources.size());  
       
         //Process parameters



Mime
View raw message