Fix not showing the members of the "GuidelineEvaluation", in the logs. Instead, only the Java-Object signature was appearing.

This commit is contained in:
Lampros Smyrnaios 2023-07-14 13:59:26 +03:00
parent fd99f536d3
commit 46116c1f9e
2 changed files with 29 additions and 0 deletions

View File

@ -36,4 +36,11 @@ public class Reporter<T, R extends Rule<T>> {
logger.error("Failed to report error of applying " + rule + " to value: " + t, throwable);
}
}
@Override
public String toString() {
return "Reporter{" +
"diagnostics=" + diagnostics +
'}';
}
}

View File

@ -135,6 +135,21 @@ class GuidelineEvaluation {
return ruleIdToRequirementLevel.get(ruleId);
}
@Override
public String toString() {
return "GuidelineEvaluation{" +
"subjectId='" + subjectId + '\'' +
", doc=" + doc +
", weight=" + weight +
", warnings=" + warnings +
", errors=" + errors +
", ruleIdToRequirementLevel=" + ruleIdToRequirementLevel +
", ruleIdToNodeList=" + ruleIdToNodeList +
", diagnostics=" + diagnostics +
", reporter=" + reporter +
'}';
}
private static final class Diagnostics extends StandardRuleDiagnostics<Document, SyntheticRule<Document>> {
@ -164,5 +179,12 @@ class GuidelineEvaluation {
private Status statusFor(String ruleId) {
return statusByRuleId.get(ruleId);
}
@Override
public String toString() {
return "Diagnostics{" +
"statusByRuleId=" + statusByRuleId +
'}';
}
}
}