我正在使用Wire-Tap來處理日誌記錄,並且我不允許使用日誌記錄通道適配器(因此爲log4j)。向線控通道添加額外信息以登錄Spring
我需要將附加信息添加到發送到具有處理日誌的接口的網關的有效負載。
有沒有一種方法沒有在流程中指定一個header-richher?
代碼澄清:
的線抽頭部分
<int:channel id="IN_messageRouterFactory">
<int:interceptors>
<int:wire-tap channel="IN_log_gateway" />
</int:interceptors>
</int:channel>
日誌記錄網關:
<int:gateway service-interface="foo.bar.loginterface">
<int:method name="log" request-channel="IN_log_gateway" />
</int:gateway>
日誌服務:
<int:chain input-channel="IN_log_gateway">
<!-- transformations here... -->
<int:service-activator ref="fileLoggerService"/>
</int:chain>
我想加一些信息,以便我可以記錄特定的管理有效負載信息
你好,謝謝你的回答,如果我的問題有些令人困惑,我很抱歉。我試圖用一個例子: 我想記錄一個鏈(它有一個變壓器和一個服務激活+錯誤檢查路由器)的開始和結束。 這條鏈條有一個合乎邏輯的含義:假設這個鏈條的含義是「向一個Web服務請求一個數字」。因此,我正在尋找的是一種方法來連接線路的輸入和輸出通道,並添加(無需指定其他組件),鏈+結果的邏輯目的(失敗或成功)。 – Massimo 2014-10-01 12:17:08
根據您的意見在答案中增加了更多信息 – 2014-10-01 12:26:21
與同事討論此問題的同時,謝謝!:) – Massimo 2014-10-01 18:57:52