cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r612499 - /incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
Date Wed, 16 Jan 2008 16:24:35 GMT
Author: dkulp
Date: Wed Jan 16 08:24:33 2008
New Revision: 612499

URL: http://svn.apache.org/viewvc?rev=612499&view=rev
Log:
Change logging for checked exceptions to fine

Modified:
    incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java

Modified: incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java?rev=612499&r1=612498&r2=612499&view=diff
==============================================================================
--- incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
(original)
+++ incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
Wed Jan 16 08:24:33 2008
@@ -33,6 +33,7 @@
 import org.apache.cxf.common.logging.LogUtils;
 import org.apache.cxf.interceptor.Interceptor;
 import org.apache.cxf.interceptor.InterceptorChain;
+import org.apache.cxf.message.FaultMode;
 import org.apache.cxf.message.Message;
 import org.apache.cxf.transport.MessageObserver;
 
@@ -210,8 +211,25 @@
                 if (!faultOccurred) {
  
                     faultOccurred = true;
-                    if (LOG.isLoggable(Level.INFO)) {
-                        LogUtils.log(LOG, Level.INFO, "Interceptor has thrown exception,
unwinding now", ex);
+                    
+                    FaultMode mode = message.get(FaultMode.class);
+                    if (mode == FaultMode.CHECKED_APPLICATION_FAULT) {
+                        if (LOG.isLoggable(Level.FINE)) { 
+                            LogUtils.log(LOG, Level.FINE,
+                                         "Application has thrown exception, unwinding now",
ex);
+                        } else if (LOG.isLoggable(Level.INFO)) {
+                            LogUtils.log(LOG, Level.INFO,
+                                         "Application has thrown exception, unwinding now:
" 
+                                         + ex.getMessage());
+                        }
+                    } else if (LOG.isLoggable(Level.INFO)) {
+                        if (mode == FaultMode.UNCHECKED_APPLICATION_FAULT) {
+                            LogUtils.log(LOG, Level.INFO,
+                                         "Application has thrown exception, unwinding now",
ex);
+                        } else {
+                            LogUtils.log(LOG, Level.INFO,
+                                         "Interceptor has thrown exception, unwinding now",
ex);
+                        }
                     }
 
                     message.setContent(Exception.class, ex);



Mime
View raw message