You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Julien D <my...@hotmail.com> on 2010/02/25 14:25:53 UTC

OnException and log level

Hi,

Since the 2.1.0 Camel is logging the exceptions at ERROR level. Is there a
way to tell Camel that it's taking care of and not log those exceptions ?

Thanks
-- 
View this message in context: http://old.nabble.com/OnException-and-log-level-tp27714424p27714424.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.


Re: OnException and log level

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

I have created ticket
https://issues.apache.org/activemq/browse/CAMEL-2504

To improve the default options so handled exceptions are not logged.
And also adding more easier options to enable/disable
retry/exhausted/handled exceptions


On Fri, Feb 26, 2010 at 6:30 PM, boday <bo...@vektrel.com> wrote:
>
> Julien, I added the following to suppress these messages...
>
> DefaultErrorHandlerBuilder errHandler = defaultErrorHandler();
> errHandler.loggingLevel(LoggingLevel.DEBUG);
> errHandler.getRedeliveryPolicy().setRetriesExhaustedLogLevel(LoggingLevel.DEBUG);
> errHandler.getRedeliveryPolicy().setRetryAttemptedLogLevel(LoggingLevel.DEBUG);
> errorHandler(errHandler);
>
>
> -----
> Ben - Senior Consultant
> using SMX 3.3.1/Camel 2.1
> --
> View this message in context: http://old.nabble.com/OnException-and-log-level-tp27714424p27721142.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus

Re: OnException and log level

Posted by boday <bo...@vektrel.com>.
Julien, I added the following to suppress these messages...

DefaultErrorHandlerBuilder errHandler = defaultErrorHandler();
errHandler.loggingLevel(LoggingLevel.DEBUG);
errHandler.getRedeliveryPolicy().setRetriesExhaustedLogLevel(LoggingLevel.DEBUG);
errHandler.getRedeliveryPolicy().setRetryAttemptedLogLevel(LoggingLevel.DEBUG);
errorHandler(errHandler);


-----
Ben - Senior Consultant
using SMX 3.3.1/Camel 2.1
-- 
View this message in context: http://old.nabble.com/OnException-and-log-level-tp27714424p27721142.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.


Re: OnException and log level

Posted by Julien D <my...@hotmail.com>.
Since the logged exception was the following :

2010-02-25 16:31:57,058 ERROR [Logger.java:248] - Failed delivery for
exchangeId: acaf9632-cad3-43c0-b642-cce11b2f87c7. Exhausted after delivery
attempt: 1 caught: MyException stack trace

I tried to add retriesExhaustedLogLevel(LoggingLevel.DEBUG) to my
OnException and the log doesn't show anymore.


Julien D wrote:
> 
> I already use the handled(true) in my exception route and I don't want
> camel to log my functionnal exceptions.
> 
> 
> Julien D wrote:
>> 
>> Hi,
>> 
>> Since the 2.1.0 Camel is logging the exceptions at ERROR level. Is there
>> a way to tell Camel that it's taking care of and not log those exceptions
>> ?
>> 
>> Thanks
>> 
> 
> 

-- 
View this message in context: http://old.nabble.com/OnException-and-log-level-tp27714424p27714464.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.


Re: OnException and log level

Posted by Julien D <my...@hotmail.com>.
I already use the handled(true) in my exception route and I don't want camel
to log my functionnal exceptions.


Julien D wrote:
> 
> Hi,
> 
> Since the 2.1.0 Camel is logging the exceptions at ERROR level. Is there a
> way to tell Camel that it's taking care of and not log those exceptions ?
> 
> Thanks
> 

-- 
View this message in context: http://old.nabble.com/OnException-and-log-level-tp27714424p27714460.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.


Re: OnException and log level

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Feb 25, 2010 at 2:25 PM, Julien D <my...@hotmail.com> wrote:
>
> Hi,
>
> Since the 2.1.0 Camel is logging the exceptions at ERROR level. Is there a
> way to tell Camel that it's taking care of and not log those exceptions ?
>

Yes. Try using code completion on onException and see which methods you got.

There are options on this one to set logging level. See redelivery options here:
http://camel.apache.org/dead-letter-channel.html

> Thanks
> --
> View this message in context: http://old.nabble.com/OnException-and-log-level-tp27714424p27714424.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus