Browse Source

Add per-line match indicators to a/c report

Update the logged auto-configuration report so that each line includes
"matched", "did not match" text. This helps when looking to see if a
specific auto-configuration class was applied or not.

Fixes gh-4084
pull/4087/head
Phillip Webb 11 years ago
parent
commit
2f694fa406
  1. 4
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/AutoConfigurationReportLoggingInitializer.java

4
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/logging/AutoConfigurationReportLoggingInitializer.java

@ -184,7 +184,9 @@ public class AutoConfigurationReportLoggingInitializer implements @@ -184,7 +184,9 @@ public class AutoConfigurationReportLoggingInitializer implements
private void addLogMessage(StringBuilder message, String source,
ConditionAndOutcomes conditionAndOutcomes) {
message.append("\n " + source + "\n");
message.append("\n " + source);
message.append(conditionAndOutcomes.isFullMatch() ? " matched\n"
: " did not match\n");
for (ConditionAndOutcome conditionAndOutcome : conditionAndOutcomes) {
message.append(" - ");
if (StringUtils.hasLength(conditionAndOutcome.getOutcome().getMessage())) {

Loading…
Cancel
Save