You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Olivier.Roger" <ol...@bsb.com> on 2010/10/29 10:45:12 UTC
[Exception] Log the stack trace in Spring DSL ?
Hello Camel,
I'am using Camel 2.5 and have a problem to log the stack trace for handled
exception.
here is my code
<onException>
<exception>org.apache.camel.NoTypeConversionAvailableException</exception>
<handled>
<constant>true</constant>
</handled>
<log loggingLevel="WARN" message="${exception}"
logName="com.bsb.docgen.DocumentGenerationNotificationRoute"/>
<to ref="deadLetterQueue" />
</onException>
I would like, in addtition to the error message, have the full stack trace.
Is that possible ?
I could not find information about it on the website.
Thanks in advance !
Olivier
--
View this message in context: http://camel.465427.n5.nabble.com/Exception-Log-the-stack-trace-in-Spring-DSL-tp3241700p3241700.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: [Exception] Log the stack trace in Spring DSL ?
Posted by "Olivier.Roger" <ol...@bsb.com>.
I'll do that until Camel 2.6 is released.
Thanks for the explanations ;)
--
View this message in context: http://camel.465427.n5.nabble.com/Exception-Log-the-stack-trace-in-Spring-DSL-tp3241700p3241774.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: [Exception] Log the stack trace in Spring DSL ?
Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Oct 29, 2010 at 11:46 AM, Olivier.Roger <ol...@bsb.com> wrote:
>
> No, It does not. The toString method prints
>
> <Exception.class> : <message>
>
> I was hoping a simple expression could be used here like
> ${exception.message}, ${exception.stackTrace} for instance.
> --
In Camel 2.6 you will be able to do that. stackTrace with a lower t.
You can use a custom expression / bean or whatever to log the
exception how you like it.
Or add a custom type converter which can convert an Exception ->
String where you then include the stacktrace.
> View this message in context: http://camel.465427.n5.nabble.com/Exception-Log-the-stack-trace-in-Spring-DSL-tp3241700p3241764.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/
Re: [Exception] Log the stack trace in Spring DSL ?
Posted by "Olivier.Roger" <ol...@bsb.com>.
No, It does not. The toString method prints
<Exception.class> : <message>
I was hoping a simple expression could be used here like
${exception.message}, ${exception.stackTrace} for instance.
--
View this message in context: http://camel.465427.n5.nabble.com/Exception-Log-the-stack-trace-in-Spring-DSL-tp3241700p3241764.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: [Exception] Log the stack trace in Spring DSL ?
Posted by Claus Ibsen <cl...@gmail.com>.
On Fri, Oct 29, 2010 at 10:45 AM, Olivier.Roger <ol...@bsb.com> wrote:
>
> Hello Camel,
>
> I'am using Camel 2.5 and have a problem to log the stack trace for handled
> exception.
>
> here is my code
>
> <onException>
> <exception>org.apache.camel.NoTypeConversionAvailableException</exception>
> <handled>
> <constant>true</constant>
> </handled>
> <log loggingLevel="WARN" message="${exception}"
> logName="com.bsb.docgen.DocumentGenerationNotificationRoute"/>
> <to ref="deadLetterQueue" />
> </onException>
>
> I would like, in addtition to the error message, have the full stack trace.
> Is that possible ?
It would do a toString on the exception, but I guess that doesnt print
the stacktrace?
I have created a ticket
https://issues.apache.org/activemq/browse/CAMEL-3293
> I could not find information about it on the website.
>
> Thanks in advance !
>
> Olivier
> --
> View this message in context: http://camel.465427.n5.nabble.com/Exception-Log-the-stack-trace-in-Spring-DSL-tp3241700p3241700.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/