incubator-wink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject svn commit: r832421 - /incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/RequestProcessor.java
Date Tue, 03 Nov 2009 13:59:29 GMT
Author: rott
Date: Tue Nov  3 13:59:28 2009
New Revision: 832421

URL: http://svn.apache.org/viewvc?rev=832421&view=rev
Log:
WINK-223: reduce debug log output for sub-500 return codes

Modified:
    incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/RequestProcessor.java

Modified: incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/RequestProcessor.java
URL: http://svn.apache.org/viewvc/incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/RequestProcessor.java?rev=832421&r1=832420&r2=832421&view=diff
==============================================================================
--- incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/RequestProcessor.java
(original)
+++ incubator/wink/trunk/wink-server/src/main/java/org/apache/wink/server/internal/RequestProcessor.java
Tue Nov  3 13:59:28 2009
@@ -188,14 +188,19 @@
             if (statusCode >= 500) {
                 logger.error(String.format(messageFormat, exceptionName), t);
             } else {
-                logger.info(String.format(messageFormat, exceptionName), t);
+                // don't log the whole call stack for sub-500 return codes unless debugging
+                if (logger.isDebugEnabled()) {
+                    logger.debug(String.format(messageFormat, exceptionName), t);
+                } else {
+                    logger.info(String.format(messageFormat, exceptionName));
+                }
             }
         } else {
             logger.error(String.format(messageFormat, exceptionName), t);
         }
     }
 
-    private ServerMessageContext createMessageContext(HttpServletRequest request,
+    private ServerMessageContext createMessageContext(HttpServletRequest request,   
                                                       HttpServletResponse response) {
         ServerMessageContext messageContext =
             new ServerMessageContext(request, response, configuration);



Mime
View raw message