You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Frankiboy <ma...@gmail.com> on 2015/03/11 13:09:41 UTC
LoggingOutInterceptor only info mode, the smartest way ?
I have a camel.xml where i log the request - response, i using cxf.
Works fine :-)
But what is the smartes way, if i only want to show when im in info mode.
Can i handle this in my camel.xml, how to do this smartest ?
in my programs im using org.apache.commons.logging.
I have a log4j.properties, log4j.rootLogger=info, console, can i change that
on the fly ?
<bean id="wsIn" class="org.apache.cxf.interceptor.LoggingOutInterceptor">
<constructor-arg value="target/write"/>
</bean>
<bean id="wsOut" class="org.apache.cxf.interceptor.LoggingOutInterceptor">
<constructor-arg value="target/write"/>
</bean>
<cxf:cxfEndpoint id="hubws" address="/CorporateService"
wsdlURL="WEB-INF/bankconnect.wsdl" >
<cxf:inInterceptors>
<bean class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
</cxf:inInterceptors>
<cxf:outInterceptors>
<bean class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
</cxf:outInterceptors>
</cxf:cxfEndpoint>
--
View this message in context: http://camel.465427.n5.nabble.com/LoggingOutInterceptor-only-info-mode-the-smartest-way-tp5764009.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: LoggingOutInterceptor only info mode, the smartest way ?
Posted by Willem Jiang <wi...@gmail.com>.
If you take a look at the LoggingOutInterceptor[1] and LoggingInInterceptor[2] you can it is hardcoded. So you may need to write your own logging interceptor or it.
[1]https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/interceptor/LoggingOutInterceptor.java
[2]https://github.com/apache/cxf/blob/master/core/src/main/java/org/apache/cxf/interceptor/LoggingInInterceptor.java
--
Willem Jiang
Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.iteye.com (Chinese)
Twitter: willemjiang
Weibo: 姜宁willem
On March 11, 2015 at 8:17:27 PM, Frankiboy (mail.to.frankj@gmail.com) wrote:
>
> I have a camel.xml where i log the request - response, i using cxf.
>
> Works fine :-)
>
> But what is the smartes way, if i only want to show when im in info mode.
>
> Can i handle this in my camel.xml, how to do this smartest ?
>
> in my programs im using org.apache.commons.logging.
>
> I have a log4j.properties, log4j.rootLogger=info, console, can i change that
> on the fly ?
>
>
>
>
>
>
>
>
>
>
> > wsdlURL="WEB-INF/bankconnect.wsdl" >
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/LoggingOutInterceptor-only-info-mode-the-smartest-way-tp5764009.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>