You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Jason Rosenberg <jr...@shopzilla.com> on 2007/11/01 03:10:42 UTC

Managing Log output from CXFServlet in Tomcat

Hi,

I'm using CXFServlet to manage a java-first web-app implementation in
Tomcat.  I've set up log4j (over commons.logging) with several logger
categories (including a root category), but I can't seem to get it to apply
to the logging output  from the CXF end-point code, in cases of
RuntimeExceptions or other soap faults, etc....These get logged to the
default catalina.out, instead of my log4j configured logs, etc....

Is CXFServlet not using apache.commons.logging, nor log4j explicitly?

Here's an example log sequence that I'd like to go to my managed logs:

Nov 1, 2007 12:56:35 AM org.apache.cxf.interceptor.AttachmentInInterceptor
handleMessage
INFO: AttachmentInInterceptor skipped in HTTP GET method
Nov 1, 2007 12:56:35 AM org.apache.cxf.interceptor.StaxInInterceptor
handleMessage
INFO: StaxInInterceptor skipped.
Nov 1, 2007 12:56:35 AM
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor handleMessage
INFO: ReadHeadersInterceptor skipped in HTTP GET method
Nov 1, 2007 12:56:35 AM org.apache.cxf.interceptor.DocLiteralInInterceptor
handleMessage
INFO: DocLiteralInInterceptor skipped in HTTP GET method
Nov 1, 2007 12:56:35 AM
org.apache.cxf.jaxws.interceptors.WrapperClassInInterceptor handleMessage
INFO: WrapperClassInInterceptor skipped in HTTP GET method
Nov 1, 2007 12:56:35 AM org.apache.cxf.phase.PhaseInterceptorChain
doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: wrong number of arguments
        at
org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:101)
        at
org.apache.cxf.jaxws.JAXWSMethodInvoker.createFault(JAXWSMethodInvoker.java:76)
        at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
        at
org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:100)
        at
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:63)
...
...

Anyone else have this sort of problem?

Thanks for any advice,

Jason
-- 
View this message in context: http://www.nabble.com/Managing-Log-output-from-CXFServlet-in-Tomcat-tf4729093.html#a13522398
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Managing Log outpu from CXFServlet in Tomcat

Posted by Daniel Kulp <dk...@apache.org>.
CXF uses java.util.logging directly.   You would need to configure the 
java.util.logging stuff.

Dan


On Wednesday 31 October 2007, Jason Rosenberg wrote:
> Hi,
>
> I'm using CXFServlet to manage a java-first web-app implementation in
> Tomcat.  I've set up log4j (over commons.logging) with several logger
> categories (including a root category), but I can't seem to get it to
> apply to the logging output  from the CXF end-point code, in cases of
> RuntimeExceptions or other soap faults, etc....These get logged to the
> default catalina.out, instead of my log4j configured logs, etc....
>
> Is CXFServlet not using apache.commons.logging, nor log4j explicitly?
>
> Here's an example log sequence that I'd like to go to my managed logs:
>
> Nov 1, 2007 12:56:35 AM
> org.apache.cxf.interceptor.AttachmentInInterceptor handleMessage
> INFO: AttachmentInInterceptor skipped in HTTP GET method
> Nov 1, 2007 12:56:35 AM org.apache.cxf.interceptor.StaxInInterceptor
> handleMessage
> INFO: StaxInInterceptor skipped.
> Nov 1, 2007 12:56:35 AM
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor
> handleMessage INFO: ReadHeadersInterceptor skipped in HTTP GET method
> Nov 1, 2007 12:56:35 AM
> org.apache.cxf.interceptor.DocLiteralInInterceptor handleMessage
> INFO: DocLiteralInInterceptor skipped in HTTP GET method
> Nov 1, 2007 12:56:35 AM
> org.apache.cxf.jaxws.interceptors.WrapperClassInInterceptor
> handleMessage INFO: WrapperClassInInterceptor skipped in HTTP GET
> method
> Nov 1, 2007 12:56:35 AM org.apache.cxf.phase.PhaseInterceptorChain
> doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.interceptor.Fault: wrong number of arguments
>         at
> org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInv
>oker.java:101) at
> org.apache.cxf.jaxws.JAXWSMethodInvoker.createFault(JAXWSMethodInvoker
>.java:76) at
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.
>java:96) at
> org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java
>:100) at
> org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.
>java:63) ...
> ...
>
> Anyone else have this sort of problem?
>
> Thanks for any advice,
>
> Jason



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727    C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog