Skip to content

Commit

Permalink
lagt til logging av pri-topic melding
Browse files Browse the repository at this point in the history
  • Loading branch information
Jesper-Hustad committed Nov 25, 2024
1 parent dbb040e commit c510369
Showing 1 changed file with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,21 @@ class ForespoerselBesvartRiver : PriObjectRiver<BesvartMelding>() {

Metrics.forespoerslerBesvartFraSpleis.inc()

return mapOf(
Key.EVENT_NAME to EventName.FORESPOERSEL_BESVART.toJson(),
Key.KONTEKST_ID to transaksjonId.toJson(),
Key.DATA to
mapOf(
Key.FORESPOERSEL_ID to forespoerselId.toJson(),
Key.SPINN_INNTEKTSMELDING_ID to spinnInntektsmeldingId?.toJson(),
Key.SPINN_INNTEKTSMELDING_ID_V2 to spinnInntektsmeldingId?.toJson(),
).mapValuesNotNull { it }
.toJson(),
)
val resultat =
mapOf(
Key.EVENT_NAME to EventName.FORESPOERSEL_BESVART.toJson(),
Key.KONTEKST_ID to transaksjonId.toJson(),
Key.DATA to
mapOf(
Key.FORESPOERSEL_ID to forespoerselId.toJson(),
Key.SPINN_INNTEKTSMELDING_ID to spinnInntektsmeldingId?.toJson(),
Key.SPINN_INNTEKTSMELDING_ID_V2 to spinnInntektsmeldingId?.toJson(),
).mapValuesNotNull { it }
.toJson(),
)
logger.info("Sendt en melding fra pri-topic.")
sikkerLogger.info("Sendt en melding fra pri-topic:\n${resultat.toJson()}")
return resultat
}

override fun BesvartMelding.haandterFeil(
Expand Down

0 comments on commit c510369

Please sign in to comment.