Class ConditionEvaluationReportLoggingListener
java.lang.Object
org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener
- All Implemented Interfaces:
org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>
public class ConditionEvaluationReportLoggingListener
extends Object
implements org.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>
ApplicationContextInitializer that writes the ConditionEvaluationReport
to the log. Reports are logged at the DEBUG level. A crash
report triggers an info output suggesting the user runs again with debug enabled to
display the report.
This initializer is not intended to be shared across multiple application context instances.
- Since:
- 2.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionforLogLevel(org.springframework.boot.logging.LogLevel logLevelForReport) Static factory method that creates aConditionEvaluationReportLoggingListenerwhich logs the report at the specified log level.voidinitialize(org.springframework.context.ConfigurableApplicationContext applicationContext)
-
Constructor Details
-
ConditionEvaluationReportLoggingListener
public ConditionEvaluationReportLoggingListener()
-
-
Method Details
-
forLogLevel
public static ConditionEvaluationReportLoggingListener forLogLevel(org.springframework.boot.logging.LogLevel logLevelForReport) Static factory method that creates aConditionEvaluationReportLoggingListenerwhich logs the report at the specified log level.- Parameters:
logLevelForReport- the log level to log the report at- Returns:
- a
ConditionEvaluationReportLoggingListenerinstance. - Since:
- 3.0.0
-
initialize
public void initialize(org.springframework.context.ConfigurableApplicationContext applicationContext) - Specified by:
initializein interfaceorg.springframework.context.ApplicationContextInitializer<org.springframework.context.ConfigurableApplicationContext>
-