在我的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
答案 0 :(得分:2)
为此特定包添加日志记录配置,例如:如果您使用的是Logback:
<logger name="org.springframework.boot.autoconfigure.logging">
<level value="INFO"/>
</logger>
因为当前日志记录发生在DEBUG级别。