有没有办法使用 aglobal 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,此信息是否已经丢失