How can I exclude the conditions evaluation report from the console of a Spring boot application?

后端 未结 3 2105
时光取名叫无心
时光取名叫无心 2020-12-15 06:42

When I run my Spring boot application, I get the conditions evaluation report in my console logs.

How can I disable or exclude this report from my console logs in Sp

相关标签:
3条回答
  • 2020-12-15 07:02

    While the other answer works, it's also possible to set the log level to INFO:

    logging.level.org.springframework.boot.autoconfigure=INFO
    
    0 讨论(0)
  • 2020-12-15 07:21

    You'll get the condition outcome report if you:

    • Configure your IDE to show debug output (for example, if you set Enable debug output within a Spring boot run configuration in IntelliJ).
    • Set the property debug=true within application.properties.
    • Set the logging level of org.springframework.boot.autoconfigure.logging to DEBUG.

    This can be useful when you're trying to find out why certain beans are not being loaded, because with this report you can see exactly which autoconfiguration is being loaded, and which one isn't (and why).

    You can disable this output by undoing the earlier mentioned bullet points. For example, you could set the logging level of org.springframework.boot.autoconfigure.logging to INFO:

    logging.level.org.springframework.boot.autoconfigure.logging=INFO
    
    0 讨论(0)
  • 2020-12-15 07:22

    You can do this by changing the log level of org.springframework.boot.autconfigure. For example by adding the following line within application.properties:

    logging.level.org.springframework.boot.autoconfigure=ERROR
    
    0 讨论(0)
提交回复
热议问题