简体   繁体   English

登录spring集成

[英]Logging in spring integration

i have API's built in springintegration to call a third party soap services. 我有一个内置于Spring集成的API来调用第三方肥皂服务。 My API's are called from camel services and sends json request and receives json response. 我的API是从camel服务调用的,并发送json请求并接收json响应。 This code was developed almost 4 years back and no logging mechanism has been provided. 此代码大约在4年前开发,并且未提供任何日志记录机制。 Now i have to implement logging for every request from camel services and response to camel services. 现在我必须为来自camel服务的每个请求和对camel服务的响应实现日志记录。 is there any mechanism provided in spring intergration which will be helpfull or i have to implment basic logging by using log4j.. Kindly help 是否有任何机制在spring集成中提供,这将有用或我必须使用log4j实现基本日志记录..请帮助

i was sudying many options on google but none of them were clear 我在谷歌上发布了许多选项,但没有一个是明确的

Would be great to see some code for more specific place to inject, but from general perspective Spring Integration provides a <logging-channel-adapter> to log messages on the channel. 很高兴看到一些代码用于更具体的注入位置,但从一般的角度来看,Spring Integration提供了一个<logging-channel-adapter>来记录通道上的消息。 Together with the <wire-tap> on channels (can be global) yo cal log almost all the messages in your flows. 与通道上的<wire-tap> (可以是全局的)一起,您可以记录流中的几乎所有消息。

More info is in the Docs: https://docs.spring.io/spring-integration/docs/current/reference/html/#logging-channel-adapter 更多信息在文档中: https//docs.spring.io/spring-integration/docs/current/reference/html/#logging-channel-adapter

On the other hand you are mentioning SOAP I hope you do that using Spring WS project and appropriate channel adapters from Spring Integration. 另一方面,您提到SOAP我希望您使用Spring WS项目和Spring Integration中的相应通道适配器来实现。 Anyway there is hook in Spring WS to log SOAP requests and responses: https://docs.spring.io/spring-ws/docs/3.0.7.RELEASE/reference/#logging 无论如何,Spring WS中都有钩子来记录SOAP请求和响应: https//docs.spring.io/spring-ws/docs/3.0.7.RELEASE/reference/#logging

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM