gpt4 book ai didi

logging - 在spring boot应用程序中如何摆脱日志中的AUTO-CONFIGURATION REPORT

转载 作者:行者123 更新时间:2023-12-04 02:06:29 25 4
gpt4 key购买 nike

在我的 springboot 应用程序中,当使用orbitz consul 客户端和 spring-consul 时,我得到了以下日志。此日志是在执行周期任务时生成的,该任务以 2 分钟的频率使用orbitz 的 consul 客户端。我想关闭以下日志,因为它们会不必要地填充日志文件。

AutoConfigurationReportLoggingInitializer [pool-45-thread-1] [DEBUG] [] 


=========================
AUTO-CONFIGURATION REPORT
=========================


Positive matches:
-----------------

ConfigurationPropertiesRebinderAutoConfiguration matched
ConfigurationPropertiesRebinderAutoConfiguration#configurationPropertiesBeans matched
ConfigurationPropertiesRebinderAutoConfiguration#configurationPropertiesBeans matched

Negative matches:
-----------------

ConsulAutoConfiguration.RetryConfiguration did not match
EncryptionBootstrapConfiguration.RsaEncryptionConfiguration did not match
- required @ConditionalOnClass classes not found: org.springframework.security.rsa.crypto.RsaSecretEncryptor (OnClassCondition)

EncryptionBootstrapConfiguration.VanillaEncryptionConfiguration did not match
- @ConditionalOnMissing classes not found: org.springframework.security.rsa.crypto.RsaSecretEncryptor (OnClassCondition)
- Keystore nor key found in Environment (EncryptionBootstrapConfiguration.KeyCondition)


Exclusions:
-----------

None


Unconditional classes:
----------------------

None

最佳答案

为这个特定的包添加日志配置,例如如果您使用的是 Logback:

<logger name="org.springframework.boot.autoconfigure.logging">
<level value="INFO"/>
</logger>

因为当前的日志记录发生在 DEBUG 级别。

关于logging - 在spring boot应用程序中如何摆脱日志中的AUTO-CONFIGURATION REPORT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42983363/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com