有没有办法使用global wire tap
并仍能记录关联频道的识别信息?为了澄清让我们假设,我想使用global wire tap
,如下所示:
...
<int:channel id="myChannel1" />
...
<int:channel id="myChannel2" />
...
<int:wire-tap pattern="*" order="2" channel="wireTapChannel" />
<int:logging-channel-adapter
id="wireTapChannel"
expression="'payload: ' + getPayload()"
level="DEBUG"
logger-name="WIRETAP" />
这会记录类似
的内容14:44:31,350 DEBUG WIRETAP:126 - payload: some payload1
14:44:31,350 DEBUG WIRETAP:126 - payload: some payload2
现在有办法放置一个表达式,以便查看日志我也可以识别相关的通道吗?我期待这样的事情:
14:44:31,350 DEBUG WIRETAP:126 - channel: myChannel1, payload: some payload1
14:44:31,350 DEBUG WIRETAP:126 - channel: myChannel2, payload: some payload2
一旦流程到达wireTapChannel
,不确定此信息是否已丢失