Skip to content

Commit

Permalink
logger ut gradert
Browse files Browse the repository at this point in the history
Co-authored-by: Jørn-Are Klubben Flaten <[email protected]>
  • Loading branch information
helehar and jaflaten committed Jan 26, 2024
1 parent 5c3aeef commit 36cc79f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import no.nav.helse.sm2013.URL
import no.nav.syfo.domain.Sykmelder
import no.nav.syfo.log
import no.nav.syfo.pdl.model.PdlPerson
import no.nav.syfo.securelog
import no.nav.syfo.sm.Diagnosekoder
import no.nav.syfo.util.LoggingMeta

Expand All @@ -53,6 +54,13 @@ fun mapOcrFilTilFellesformat(
)
}

securelog.info(
"aktivitetIkkeMulig gradertSykmelding: {} {} {}",
skanningmetadata.sykemeldinger.aktivitet.aktivitetIkkeMulig.toString(),
skanningmetadata.sykemeldinger.aktivitet.gradertSykmelding.sykmeldingsgrad.toString(),
fields(loggingMeta),
)

return XMLEIFellesformat().apply {
any.add(
XMLMsgHead().apply {
Expand Down
9 changes: 2 additions & 7 deletions src/main/kotlin/no/nav/syfo/service/SykmeldingService.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
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 @@ -33,15 +31,12 @@ 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 @@ -166,8 +161,8 @@ class SykmeldingService(
)

val fellesformatText = fellesformatMarshaller.toString(fellesformat)

securelog.info("Fellesformat: {} {}",
securelog.info(
"Fellesformat: {} {}",
fellesformatText,
fields(loggingMeta),
)
Expand Down

0 comments on commit 36cc79f

Please sign in to comment.