Return-Path: Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: (qmail 74941 invoked from network); 20 Feb 2009 21:44:55 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Feb 2009 21:44:55 -0000 Received: (qmail 56005 invoked by uid 500); 20 Feb 2009 21:44:54 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 55953 invoked by uid 500); 20 Feb 2009 21:44:54 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 55944 invoked by uid 99); 20 Feb 2009 21:44:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Feb 2009 13:44:54 -0800 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Feb 2009 21:44:46 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 199DD2388995; Fri, 20 Feb 2009 21:44:26 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r746374 - in /cxf/trunk: api/src/main/java/org/apache/cxf/interceptor/Fault.java api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java systests/src/test/java/org/apache/cxf/cxf1332/Cxf1332Test.java Date: Fri, 20 Feb 2009 21:44:25 -0000 To: commits@cxf.apache.org From: dkulp@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090220214426.199DD2388995@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: dkulp Date: Fri Feb 20 21:44:25 2009 New Revision: 746374 URL: http://svn.apache.org/viewvc?rev=746374&view=rev Log: Restore exception logging in PIC. Add utility contructors to Fault to make it easier to use and avoid Message import issues. Modified: cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/Fault.java cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1332/Cxf1332Test.java Modified: cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/Fault.java URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/Fault.java?rev=746374&r1=746373&r2=746374&view=diff ============================================================================== --- cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/Fault.java (original) +++ cxf/trunk/api/src/main/java/org/apache/cxf/interceptor/Fault.java Fri Feb 20 21:44:25 2009 @@ -19,6 +19,9 @@ package org.apache.cxf.interceptor; +import java.util.ResourceBundle; +import java.util.logging.Logger; + import javax.xml.namespace.QName; import org.w3c.dom.Element; @@ -51,6 +54,19 @@ code = FAULT_CODE_SERVER; } + public Fault(String message, Logger log) { + this(new Message(message, log)); + } + public Fault(String message, ResourceBundle b) { + this(new Message(message, b)); + } + public Fault(String message, Logger log, Throwable t) { + this(new Message(message, log), t); + } + public Fault(String message, ResourceBundle b, Throwable t) { + this(new Message(message, b), t); + } + public Fault(Throwable t) { super(t); if (super.getMessage() != null) { Modified: cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java URL: http://svn.apache.org/viewvc/cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java?rev=746374&r1=746373&r2=746374&view=diff ============================================================================== --- cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java (original) +++ cxf/trunk/api/src/main/java/org/apache/cxf/phase/PhaseInterceptorChain.java Fri Feb 20 21:44:25 2009 @@ -239,23 +239,27 @@ FaultMode mode = message.get(FaultMode.class); if (mode == FaultMode.CHECKED_APPLICATION_FAULT) { if (LOG.isLoggable(Level.FINE)) { - LOG.fine("Application has thrown exception, unwinding now " + ex.getMessage()); + LogUtils.log(LOG, Level.FINE, + "Application has thrown exception, unwinding now", ex); } else if (LOG.isLoggable(Level.INFO)) { Throwable t = ex; if (ex instanceof Fault && ex.getCause() != null) { t = ex.getCause(); - } - - LOG.info("Application has thrown exception, unwinding now: " + } + + LogUtils.log(LOG, Level.INFO, + "Application has thrown exception, unwinding now: " + t.getClass().getName() - + ": " + ex.getMessage()); + + ": " + ex.getMessage()); } } else if (LOG.isLoggable(Level.INFO)) { if (mode == FaultMode.UNCHECKED_APPLICATION_FAULT) { - LOG.info("Application has thrown exception, unwinding now " + ex.getMessage()); + LogUtils.log(LOG, Level.INFO, + "Application has thrown exception, unwinding now", ex); } else { - LOG.info("Interceptor has thrown exception, unwinding now " + ex.getMessage()); + LogUtils.log(LOG, Level.INFO, + "Interceptor has thrown exception, unwinding now", ex); } } Modified: cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1332/Cxf1332Test.java URL: http://svn.apache.org/viewvc/cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1332/Cxf1332Test.java?rev=746374&r1=746373&r2=746374&view=diff ============================================================================== --- cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1332/Cxf1332Test.java (original) +++ cxf/trunk/systests/src/test/java/org/apache/cxf/cxf1332/Cxf1332Test.java Fri Feb 20 21:44:25 2009 @@ -21,7 +21,6 @@ import org.apache.cxf.test.AbstractCXFSpringTest; import org.junit.Test; -import org.springframework.context.support.GenericApplicationContext; /** * @@ -34,11 +33,6 @@ public Cxf1332Test() throws Exception { } - /** {@inheritDoc}*/ - @Override - protected void additionalSpringConfiguration(GenericApplicationContext context) throws Exception { - } - @Test public void tryToSendStringArray() throws Exception { Cxf1332 client = getBean(Cxf1332.class, "client"); @@ -52,5 +46,4 @@ protected String[] getConfigLocations() { return new String[] {"classpath:/org/apache/cxf/cxf1332/beans.xml" }; } - }