You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Se...@troika.ru on 2011/01/28 16:43:17 UTC

Error handler: log handled exception

Hi there,

Is it possible to log exception handled by means of errorHandler.

Consider I have the following configuration 

<errorHandler id="defaultErrorHandler" type="DeadLetterChannel" 
deadLetterUri="dlq" useOriginalMessage="true">
    <redeliveryPolicy maximumRedeliveries="0" redeliveryDelay="1000" 
logHandled="true"/>
</errorHandler>

Here logHandled attribute is true.

There is the following piece of code in the 
RedeliveryErrorHandler.logFailedDelivery method 

if (handled && !data.currentRedeliveryPolicy.isLogHandled()) {
    // do not log handled
    return;
}

According to this piece of code my exception will not be logged,  which is 
a little bit confusing, because logHandled attribute is true.


Best Regards,
Sergey Zhemzhitsky