Author: dkulp
Date: Thu Jan 17 09:27:14 2008
New Revision: 612879

URL: http://svn.apache.org/viewvc?rev=612879&view=rev
Log:
Merged revisions 612499 via svnmerge from 
https://svn.apache.org/repos/asf/incubator/cxf/trunk

........
  r612499 | dkulp | 2008-01-16 11:24:33 -0500 (Wed, 16 Jan 2008) | 2 lines
  
  Change logging for checked exceptions to fine
........

Modified:
    incubator/cxf/branches/2.0.x-fixes/   (props changed)
    
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java

Propchange: incubator/cxf/branches/2.0.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: 
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
URL: 
http://svn.apache.org/viewvc/incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java?rev=612879&r1=612878&r2=612879&view=diff
==============================================================================
--- 
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
 (original)
+++ 
incubator/cxf/branches/2.0.x-fixes/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
 Thu Jan 17 09:27:14 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);


Reply via email to