[英]How to stop spring framework logs in the spring integration application
我需要停止框架日志。 我需要打印應用程序日志而不是框架日志。我們正在對應用程序使用spring boot和spring集成,並使用線陷阱記錄請求。 我可以更改日志記錄級別(logging.level.org.springframework = WARN)以停止框架日志,但是當我這樣做時,我的應用程序日志也不會打印。 有什么辦法可以阻止框架日志的打印。
<int:channel id="arrowEyeRequest">
<int:interceptors>
<int:wire-tap channel="arrowEyeTransformedRequestLogger" />
</int:interceptors>
</int:channel>
<int:logging-channel-adapter id="arrowEyeTransformedRequestLogger" expression="'ArrowEye(FP-024)---- transformed ArrowEye request---- \n'.concat(payload)" level="INFO" />
<int:logging-channel-adapter>
具有logger-name
屬性:
<xsd:attribute name="logger-name" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
Provide a name for the logger. This is useful when there are multiple logging Channel Adapters configured,
and you would like to differentiate them within the actual log. By default the logger name will be the
fully qualified class name of the LoggingHandler implementation.
</xsd:documentation>
</xsd:annotation>
</xsd:attribute>
因此,即使您具有logging.level.org.springframework=WARN
,您仍然可以配置諸如logging.level.myLogger=INFO
並將其存儲在通道適配器中:
<int:logging-channel-adapter id="arrowEyeTransformedRequestLogger"
expression="'ArrowEye(FP-024)---- transformed ArrowEye request---- \n'.concat(payload)"
logger-name="myLogger"
level="INFO" />
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.