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

标签 logging spring-boot

在我的 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/

相关文章:

logging - 如何查看使用 Edeliver 部署的 Phoenix Web 应用程序中的生产日志?

haskell - 在 Haskell 的 ST Monad 中高效记录字符串数据

java - Spring:如何使服务以 PlatformTransactionManager bean 的可用性为条件?

java - 没有设置数据源就无法启动 spring boot 应用程序

tomcat - tomcat VS Wildfly 中不同的 URI 处理

debugging - 帮助 gdb 调试崩溃日志记录

apache - 如何从 Apache 日志中提取包含下载计数的文件列表

spring - 无法在 @Scheduled 注释中使用 @ConfigurationProperties

spring-boot - 在 Spring Integration 测试中,分区时间转换为 UTC

python - 如何从 Python 日志记录模块获取非阻塞/实时行为? (输出到 PyQt QTextBrowser)