骡子抑制捕获异常策略记录

时间:2013-08-27 17:56:58

标签: exception logging mule

有没有办法抑制Mule的(3.3.1)catch-exception-strategy行为,记录组件的特定实例的整个堆栈跟踪?我不想在类的log4j配置中这样做,因为我想要记录意外的异常。

我希望能够在流程中捕获异常并决定是否记录它(并吓跑操作团队)或者只是采取纠正措施并继续前进。在下面,是否有一些方法可以将第一个实例配置为不记录堆栈跟踪?

<choice-exception-strategy>
    <catch-exception-strategy when="exception.causedBy(my.exception.SpecificException)">
        <!-- I don't want logging on this one -->                
    </catch-exception-strategy>

    <catch-exception-strategy>
        <!-- I do want it here -->
    </catch-exception-strategy>
</choice-exception-strategy>

2 个答案:

答案 0 :(得分:1)

对于Mule 3.3.1,我不这么认为。它应该在Mule 3.4.0中得到支持,你可以试试吗?

https://www.mulesoft.org/jira/browse/MULE-6575

答案 1 :(得分:0)

这已在最新的3.8.2版本中修复,我们需要取消选中logException块,默认情况下为真。

enter image description here

相关问题