You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2008/01/16 17:24:35 UTC
svn commit: r612499 -
/incubator/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java
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);