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
This commit is contained in:
Phillip Webb 2015-10-02 13:05:52 -07:00
parent eae7b0364b
commit 2f694fa406
1 changed files with 3 additions and 1 deletions

View File

@ -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())) {