【发布时间】:2013-08-27 17:56:57
【问题描述】:
是否有任何方法可以抑制 Mule (3.3.1) 为组件的特定实例记录整个堆栈跟踪的捕获异常策略行为?我不想在类的 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>
【问题讨论】: