The best option is to create your own org.apache.cxf.logging.FaultListener and 
register that either on the bus or on the endpoint.   It would be a property 
named “org.apache.cxf.logging.FaultListener”.    At that point, you can pretty 
much log it anyway you want.

Dan





> On Dec 13, 2017, at 11:38 AM, COURTAULT Francois 
> <[email protected]> wrote:
> 
> Hello,
> 
> First of all, I am using cxf 3.1.13  in TomEE (7.0.4).
> 
> If my JAX-WS endpoint raises a RuntimeException or an Exception, in the 
> server log I have something like:
> 13-Dec-2017 16:23:31.027 WARNING [http-nio-8080-exec-2] 
> org.apache.cxf.phase.PhaseInterceptorChain.doDefaultLogging Application 
> {http://com.test/wsdl}MyManagerService#{http://com.test/wsdl}helloWorld has 
> thrown exception, unwinding now
> ....
> Caused by: java.lang.RuntimeException
>                at com.gemalto.jaxws.MyManager.helloWorld(MyManager.java:36)
> 
> by default.
> 
> I have looked at http://cxf.apache.org/docs/interceptors.html but I am bit 
> lost.
> For example I don't know at which phase this logging occurs.
> 
> So our goal is either to disable this doDefaultLogging stuff in order to use 
> our own logging stuff (better control on what we want to disclose in the log) 
> or to configure this doDefaultLogging stuff in order to display only the 
> first 2 lines of the Caused by.
> 
> Do you know how to do this ?
> 
> We have seen that we may use a CustomHandler but we don't know yet how to use 
> it.
> 
> Best Regards.
> ________________________________
> This message and any attachments are intended solely for the addressees and 
> may contain confidential information. Any unauthorized use or disclosure, 
> either whole or partial, is prohibited.
> E-mails are susceptible to alteration. Our company shall not be liable for 
> the message if altered, changed or falsified. If you are not the intended 
> recipient of this message, please delete it and notify the sender.
> Although all reasonable efforts have been made to keep this transmission free 
> from viruses, the sender will not be liable for damages caused by a 
> transmitted virus.

-- 
Daniel Kulp
[email protected] - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com

Reply via email to