骆驼中exception.message的替代

时间:2019-02-01 06:56:57

标签: xml exception-handling apache-camel

当前正在使用以下日志记录:

loggingLevel="ERROR" message="Exception in route while processing message ${exception.message}"/>

正在寻找exception.message的替代方法,以便我可以打印整个堆栈跟踪。

1 个答案:

答案 0 :(得分:0)

您已经尝试过exception.stacktrace吗?自Camel 2.6起可用。

文档说: Camel 2.6. Refer to the exception.stracktrace on the exchange. Result is null if no exception set on exchange. Will fallback and grab caught exceptions (Exchange.EXCEPTION_CAUGHT) if the Exchange has any.