Skip to content

Commit

Permalink
issue #118 : use toString to log engine parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
fmbenhassine committed Oct 1, 2017
1 parent 2505d8a commit 22cf89b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,14 +201,7 @@ private boolean shouldBeEvaluated(Rule rule, Facts facts) {
}

private void logEngineParameters() {
LOGGER.info("Rule priority threshold: {}",
parameters.getPriorityThreshold());
LOGGER.info("Skip on first applied rule: {}",
parameters.isSkipOnFirstAppliedRule());
LOGGER.info("Skip on first non triggered rule: {}",
parameters.isSkipOnFirstNonTriggeredRule());
LOGGER.info("Skip on first failed rule: {}",
parameters.isSkipOnFirstFailedRule());
LOGGER.info(parameters.toString());
}

private void log(Rules rules) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,4 +149,13 @@ public void setSkipOnFirstFailedRule(final boolean skipOnFirstFailedRule) {
this.skipOnFirstFailedRule = skipOnFirstFailedRule;
}

@Override
public String toString() {
return "Engine parameters { " +
"skipOnFirstAppliedRule=" + skipOnFirstAppliedRule +
", skipOnFirstNonTriggeredRule=" + skipOnFirstNonTriggeredRule +
", skipOnFirstFailedRule=" + skipOnFirstFailedRule +
", priorityThreshold=" + priorityThreshold +
" }";
}
}

0 comments on commit 22cf89b

Please sign in to comment.