You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Preben.Asmussen" <pr...@dr.dk> on 2016/03/29 13:27:04 UTC

setting logExhaustedMessageBody in Spring xml

Hi

In v. 2.17.0 the body and header is not logged by default by the
errorhandler.

To get the old behaviour back where the message history is loggend including
the exchange header/body in Spring xml it seems that I have to declare quite
a bit of extra wirering.
See foo and bar beans.

    
    <bean id="foo" class="org.apache.camel.processor.RedeliveryPolicy">
        <property name="logExhaustedMessageBody" value="true"/>
    </bean>
    
    <camelContext id="my-Context" 
xmlns="http://camel.apache.org/schema/spring">
        <errorHandler id="bar" type="TransactionErrorHandler"
redeliveryPolicyRef="foo"/>
        
        <route id="my-route" errorHandlerRef="bar">
            <from uri="direct:start" />
            <transacted />
            <bean ref="someBean" />
            <convertBodyTo type="java.lang.String" />
            <inOut uri="cxfrs:bean:sms?synchronous=true" />
        </route>
  
Would be nice if you could turn logExhaustedMessageBody on/off on the
camelContext level as you can with messageHistory.


/Preben



--
View this message in context: http://camel.465427.n5.nabble.com/setting-logExhaustedMessageBody-in-Spring-xml-tp5779942.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: setting logExhaustedMessageBody in Spring xml

Posted by "Preben.Asmussen" <pr...@dr.dk>.
Logged https://issues.apache.org/jira/browse/CAMEL-9772

I will have a peek at it and work on a PR.

Best,
Preben



--
View this message in context: http://camel.465427.n5.nabble.com/setting-logExhaustedMessageBody-in-Spring-xml-tp5779942p5779967.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: setting logExhaustedMessageBody in Spring xml

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Yeah good idea, you are welcome to log a JIRA and work on a PR also.
You can possible look at how its implemented for the message history
and copy/paste - there is a bit of code needed.

On Tue, Mar 29, 2016 at 1:27 PM, Preben.Asmussen <pr...@dr.dk> wrote:
> Hi
>
> In v. 2.17.0 the body and header is not logged by default by the
> errorhandler.
>
> To get the old behaviour back where the message history is loggend including
> the exchange header/body in Spring xml it seems that I have to declare quite
> a bit of extra wirering.
> See foo and bar beans.
>
>
>     <bean id="foo" class="org.apache.camel.processor.RedeliveryPolicy">
>         <property name="logExhaustedMessageBody" value="true"/>
>     </bean>
>
>     <camelContext id="my-Context"
> xmlns="http://camel.apache.org/schema/spring">
>         <errorHandler id="bar" type="TransactionErrorHandler"
> redeliveryPolicyRef="foo"/>
>
>         <route id="my-route" errorHandlerRef="bar">
>             <from uri="direct:start" />
>             <transacted />
>             <bean ref="someBean" />
>             <convertBodyTo type="java.lang.String" />
>             <inOut uri="cxfrs:bean:sms?synchronous=true" />
>         </route>
>
> Would be nice if you could turn logExhaustedMessageBody on/off on the
> camelContext level as you can with messageHistory.
>
>
> /Preben
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/setting-logExhaustedMessageBody-in-Spring-xml-tp5779942.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2