登录spring集成Java DSL

问题描述 投票:0回答:1

我想在控制台中打印消息日志并写入日志文件。我正在尝试使用[[logging-channel-adapterLoggingHandler请给我示例代码。谢谢

java spring logging spring-integration spring-integration-dsl
1个回答
0
投票
Use one of the .log() operators

[为了方便起见,要记录通过Spring Integration流()的消息过程,将显示一个log()运算符。在内部,它由WireTap ChannelInterceptor表示,并以LoggingHandler作为其订阅者。它负责将传入消息记录到下一个端点或当前通道中。以下示例显示如何使用LoggingHandler:

.log()

© www.soinside.com 2019 - 2024. All rights reserved.