【发布时间】:2019-08-23 08:56:28
【问题描述】:
我的应用程序上有几个不同的集成流程,目前它们基于 cron 运行,它们是从我的 MessagingGateway 实例化的,所以当我的流程运行时我发送一个名为“executionId”的标头,所以我想记录所有“跑步”所做的活动。
关于如何从我的流程中捕获每个日志的任何想法?例如像
这样的日志"file x has been successfully transferred"
"Cannot delete local file x. The local file may be busy in some other process."
我需要消息处理器/处理程序上已经存在的相同日志输出,有没有办法根据消息头上的 executionId 将它们全部捕获并写入数据库?
目前我正在各处添加 .log 并根据建议添加 onSuccessChannel,但我认为应该有更好的方法
【问题讨论】:
标签: spring spring-boot spring-integration spring-integration-dsl