Skip to content

Commit

Permalink
logger fellesformat i mottak
Browse files Browse the repository at this point in the history
Co-authored-by: Jørn-Are Flaten <[email protected]>
  • Loading branch information
helehar and jaflaten committed Jan 26, 2024
1 parent 4f3fe12 commit 5c3aeef
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/main/kotlin/no/nav/syfo/service/SykmeldingService.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package no.nav.syfo.service

import com.migesok.jaxb.adapter.javatime.LocalDateTimeXmlAdapter
import com.migesok.jaxb.adapter.javatime.LocalDateXmlAdapter
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.ZoneId
Expand Down Expand Up @@ -29,13 +31,17 @@ import no.nav.syfo.model.ReceivedSykmelding
import no.nav.syfo.model.Status
import no.nav.syfo.pdl.model.PdlPerson
import no.nav.syfo.pdl.service.PdlPersonService
import no.nav.syfo.securelog
import no.nav.syfo.util.LoggingMeta
import no.nav.syfo.util.XMLDateAdapter
import no.nav.syfo.util.XMLDateTimeAdapter
import no.nav.syfo.util.extractHelseOpplysningerArbeidsuforhet
import no.nav.syfo.util.fellesformatMarshaller
import no.nav.syfo.util.get
import no.nav.syfo.util.getLocalDateTime
import no.nav.syfo.util.toString
import org.apache.kafka.clients.producer.KafkaProducer
import javax.xml.bind.Marshaller

class SykmeldingService(
private val oppgaveService: OppgaveService,
Expand Down Expand Up @@ -158,6 +164,13 @@ class SykmeldingService(
"Sykmelding mappet til internt format uten feil {}",
fields(loggingMeta)
)

val fellesformatText = fellesformatMarshaller.toString(fellesformat)

securelog.info("Fellesformat: {} {}",
fellesformatText,
fields(loggingMeta),
)
PAPIRSM_MAPPET.labels("ok").inc()

log.info("Validerer sykmelding mot regler, {}", fields(loggingMeta))
Expand Down

0 comments on commit 5c3aeef

Please sign in to comment.