Hi,
I've defined an Error Handler, which applies to multiple routes i.e.
errorHandler(transactionErrorHandler()
.maximumRedeliveries(5)
.log("SOMETHING USELESS");
from(file1)
.id(route1)
.transacted()
.process(new SpecificProcessor1());
from(file2)
.id(route2)
.transacted()
.process(new SpecificProcessor2());
When an Exception occurs inside one of the SpecificProcessor classes, the
following is logged:
[10-Jan-2014 15:08:59.449] [Error] SOMETHING USELESS: Failed delivery for
(MessageId: ID-BLAH BLAH). On delivery attempt: 1 caught:
java.lang.Exception: cannot do whatever I'm supposed to do
Now I would like to print something useful to help identify whether the
Exception has happened in route1 or route2 i.e.:
[10-Jan-2014 15:08:59.449] [Error] ROUTE 1: Failed delivery for (MessageId:
ID-BLAH BLAH). On delivery attempt: 1 caught: java.lang.Exception: cannot do
whatever I'm supposed to do
How can I achieve that?
Many thanks!
--
View this message in context:
http://camel.465427.n5.nabble.com/Using-log-method-during-Error-Handler-tp5745839.html
Sent from the Camel - Users mailing list archive at Nabble.com.