Skip to content

Commit

Permalink
only log results where status not OK
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasDev committed Sep 13, 2023
1 parent 8cdf864 commit ebad29e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/main/kotlin/no/nav/syfo/services/RuleService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,11 @@ class RuleService(
.inc()

if (validationResult.status != Status.OK) {
secureLog.info("RuleResult for ${receivedSykmelding.sykmelding.id}: ${objectMapper.writerWithDefaultPrettyPrinter().writeValueAsString(result)}")
secureLog.info(
"RuleResult for ${receivedSykmelding.sykmelding.id}: ${objectMapper
.writerWithDefaultPrettyPrinter()
.writeValueAsString(result.filter { it.first.treeResult.status != Status.OK })}"
)
}

return validationResult
Expand Down

0 comments on commit ebad29e

Please sign in to comment.