Example usage for org.springframework.boot.autoconfigure.logging ConditionEvaluationReportMessage ConditionEvaluationReportMessage

List of usage examples for org.springframework.boot.autoconfigure.logging ConditionEvaluationReportMessage ConditionEvaluationReportMessage

Introduction

In this page you can find the example usage for org.springframework.boot.autoconfigure.logging ConditionEvaluationReportMessage ConditionEvaluationReportMessage.

Prototype

public ConditionEvaluationReportMessage(ConditionEvaluationReport report, String title) 

Source Link

Usage

From source file:org.springframework.boot.devtools.autoconfigure.ConditionEvaluationDeltaLoggingListener.java

@Override
public void onApplicationEvent(ApplicationReadyEvent event) {
    ConditionEvaluationReport report = event.getApplicationContext().getBean(ConditionEvaluationReport.class);
    if (previousReport != null) {
        ConditionEvaluationReport delta = report.getDelta(previousReport);
        if (!delta.getConditionAndOutcomesBySource().isEmpty() || !delta.getExclusions().isEmpty()
                || !delta.getUnconditionalClasses().isEmpty()) {
            if (this.logger.isInfoEnabled()) {
                this.logger.info("Condition evaluation delta:"
                        + new ConditionEvaluationReportMessage(delta, "CONDITION EVALUATION DELTA"));
            }/*from ww  w .j a v a  2  s.  c  o m*/
        } else {
            this.logger.info("Condition evaluation unchanged");
        }
    }
    previousReport = report;
}