Spring integration Spring集成-Wiretap不';部署到Pivotal Cloud Foundry时不会记录日志
当消息流经通道时,我们尝试使用wire-tap拦截器记录消息。Wire-tap以某种方式在本地运行时完全登录到控制台,但在部署到PCF环境时,无法查看日志。下面是parsing.xml配置Spring integration Spring集成-Wiretap不';部署到Pivotal Cloud Foundry时不会记录日志,spring-integration,slf4j,spring-boot-actuator,pcf,Spring Integration,Slf4j,Spring Boot Actuator,Pcf,当消息流经通道时,我们尝试使用wire-tap拦截器记录消息。Wire-tap以某种方式在本地运行时完全登录到控制台,但在部署到PCF环境时,无法查看日志。下面是parsing.xml配置 <int:channel id="logChannel"></int:channel> <int:message-history/> <int:wire-tap id="globalWireTap" channel="logChannel" pattern="*"
<int:channel id="logChannel"></int:channel>
<int:message-history/>
<int:wire-tap id="globalWireTap" channel="logChannel" pattern="*"/>
<int:logging-channel-adapter channel="logChannel" level="WARN" expression="headers.history" />
使用的日志依赖项包括:
<!-- Logging dependencies -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
</dependency>
<dependency>
<groupId>com.****</groupId>
<artifactId>logging-impl-spring-4</artifactId>
<version>1.1-*</version>
<scope>runtime</scope>
</dependency>
org.slf4j
slf4j api
com****
logging-impl-spring-4
1.1-*
运行时
我认为在提到的警告
级别下没有记录任何内容。我不熟悉PCF,但我可以看出默认情况下,日志通道适配器的类别是org.springframework.integration.handler
。因此,请尝试在PCF中为您的项目配置适当的日志记录选项。这确实不是Spring集成的问题。我将尝试在“信息”级别进行配置,并尝试它是否与日志系统挂钩。至于日志配置,还需要进一步研究。