[ 
https://issues.apache.org/jira/browse/CXF-2596?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Tomas Majak updated CXF-2596:
-----------------------------

    Description: 
A user of CXF may need custom handling for runtime errors produced by the 
application, not catchable within the application, e.g. exceptions from 
interceptors to the actual service.
E.g. applications may produce Exceptions that are a normal part of the flow in 
the application, in that case, it pollutes the log file to have it logged as 
stacktrace. 

background: http://www.mail-archive.com/us...@cxf.apache.org/msg10976.html

Configure via setting property to Bus or Service:
 <property name="org.apache.cxf.logging.FaultLogger">
       <bean class="com.foo.MyFaultLogger"/>
   </property>

MyFaultLogger must implement org.apache.cxf.logging.FaultLogger

Programatically:
Bus bean = (Bus) applicationContext.getBean("cxf");
bean.setProperty("org.apache.cxf.logging.FaultLogger", myLogger);

By endpoint:
<jaxws:endpoint id="mySericeWS" implementor="#myServiceBean" 
address="/myServiceWS">
  <jaxws:properties>
    <entry key="org.apache.cxf.logging.FaultLogger">
      <bean class="com.foo.MyFaultLogger"/>
    </entry>
  </jaxws:properties>
</jaxws:endpoint>


  was:
A user of CXF may need custom handling for runtime errors produced by the 
application, not catchable within the application, e.g. exceptions from 
interceptors to the actual service.
E.g. applications may produce Exceptions that are a normal part of the flow in 
the application, in that case, it pollutes the log file to have it logged as 
stacktrace. 

background: http://www.mail-archive.com/us...@cxf.apache.org/msg10976.html



added how to use.

> Default logging in interceptor chain may pollute the log with stacktrace from 
> application exceptions that are a part of the normal flow (should not be 
> logged).
> ---------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CXF-2596
>                 URL: https://issues.apache.org/jira/browse/CXF-2596
>             Project: CXF
>          Issue Type: New Feature
>          Components: Configuration
>         Environment: All
>            Reporter: Tomas Majak
>         Attachments: custom_logging_in_interceptorchain.patch
>
>
> A user of CXF may need custom handling for runtime errors produced by the 
> application, not catchable within the application, e.g. exceptions from 
> interceptors to the actual service.
> E.g. applications may produce Exceptions that are a normal part of the flow 
> in the application, in that case, it pollutes the log file to have it logged 
> as stacktrace. 
> background: http://www.mail-archive.com/us...@cxf.apache.org/msg10976.html
> Configure via setting property to Bus or Service:
>  <property name="org.apache.cxf.logging.FaultLogger">
>        <bean class="com.foo.MyFaultLogger"/>
>    </property>
> MyFaultLogger must implement org.apache.cxf.logging.FaultLogger
> Programatically:
> Bus bean = (Bus) applicationContext.getBean("cxf");
> bean.setProperty("org.apache.cxf.logging.FaultLogger", myLogger);
> By endpoint:
> <jaxws:endpoint id="mySericeWS" implementor="#myServiceBean" 
> address="/myServiceWS">
>   <jaxws:properties>
>     <entry key="org.apache.cxf.logging.FaultLogger">
>       <bean class="com.foo.MyFaultLogger"/>
>     </entry>
>   </jaxws:properties>
> </jaxws:endpoint>

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to