Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 27071 invoked from network); 26 Jan 2009 10:14:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Jan 2009 10:14:28 -0000 Received: (qmail 65708 invoked by uid 500); 26 Jan 2009 10:14:28 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 65692 invoked by uid 500); 26 Jan 2009 10:14:28 -0000 Mailing-List: contact issues-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 issues@cxf.apache.org Received: (qmail 65681 invoked by uid 99); 26 Jan 2009 10:14:28 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jan 2009 02:14:28 -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.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Jan 2009 10:14:19 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 8C012234C48B for ; Mon, 26 Jan 2009 02:13:59 -0800 (PST) Message-ID: <775472150.1232964839568.JavaMail.jira@brutus> Date: Mon, 26 Jan 2009 02:13:59 -0800 (PST) From: "Sean O'Callaghan (JIRA)" To: issues@cxf.apache.org Subject: [jira] Closed: (CXF-1981) Inconsistent use of logger delegation via LogUtils In-Reply-To: <1632876055.1231940224123.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-1981?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sean O'Callaghan closed CXF-1981. --------------------------------- Resolution: Fixed Made the change Andy suggested. > Inconsistent use of logger delegation via LogUtils > -------------------------------------------------- > > Key: CXF-1981 > URL: https://issues.apache.org/jira/browse/CXF-1981 > Project: CXF > Issue Type: Bug > Affects Versions: 2.2 > Reporter: Andrzej Michalec > Assignee: Sean O'Callaghan > Priority: Minor > Fix For: 2.2 > > > Even after installation of Log4jLogger delegate (via META-INF/cxf/org.apache.cxf.Logger file) some messages still are logged by java.util.logging -- example: > 14 Jan 2009 14:09:05,358 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO org.apache.cxf.bus.spring.BusApplicationContext - Refreshing org.apache.cxf.bus.spring.BusApplicationContext@6c826c82: display name [org.apache.cxf.bus.spring.BusApplicationContext@6c826c82]; startup date [Wed Jan 14 14:09:05 CET 2009]; parent: org.springframework.web.context.support.XmlWebApplicationContext@6abe6abe > 14 Jan 2009 14:09:05,393 [ContainerBackgroundProcessor[StandardEngine[Catalina]]] INFO org.apache.cxf.bus.spring.BusApplicationContext - Bean factory for application context [org.apache.cxf.bus.spring.BusApplicationContext@6c826c82]: org.springframework.beans.factory.support.DefaultListableBeanFactory@75d275d2 > ... > Jan 14, 2009 2:10:03 PM org.apache.cxf.phase.PhaseInterceptorChain doIntercept > INFO: Application has thrown exception, unwinding now > org.apache.cxf.interceptor.Fault > at org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:148) > at org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:114) > ... > Review of PhaseInterceptorChain class shows that some log messages are passed via delegating logger and other via direct call to LogUtils: > public class PhaseInterceptorChain implements InterceptorChain { > private static final Logger LOG = LogUtils.getL7dLogger(PhaseInterceptorChain.class); > ... > public void add(Interceptor i, boolean force) { > ... > if (LOG.isLoggable(Level.FINE)) { > LOG.fine("Adding interceptor " + i + " to phase " + phaseName); > } > ... > } > public synchronized boolean doIntercept(Message message) { > ... > if (LOG.isLoggable(Level.FINE)) { > LogUtils.log(LOG, Level.FINE, > "Application has thrown exception, unwinding now", ex); > } else if (LOG.isLoggable(Level.INFO)) { > ... > } > } > Workaround is to install SFL4J delegating JUL to Log4j however I guess it would be better clean up the code. I think that use of LogUtils.log() should be forbidden and enforcement could be done via checkstyle (marking this method as depreciaded first) -or- introduction of AOP with aspect checking calls to illegal method. > cheers, > andy -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.