Skip to content

Commit

Permalink
logger ocr i mottak
Browse files Browse the repository at this point in the history
  • Loading branch information
helehar committed Jan 26, 2024
1 parent 5c3aeef commit 01489aa
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main/kotlin/no/nav/syfo/service/SykmeldingService.kt
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,13 @@ 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.skanningMetadataUnmarshaller
import no.nav.syfo.util.toString
import org.apache.kafka.clients.producer.KafkaProducer
import org.xml.sax.InputSource
import javax.xml.bind.Marshaller
import javax.xml.transform.Source
import javax.xml.transform.sax.SAXSource

class SykmeldingService(
private val oppgaveService: OppgaveService,
Expand Down Expand Up @@ -111,6 +115,7 @@ class SykmeldingService(

tellOcrInnhold(ocr, loggingMeta)


val fellesformat =
mapOcrFilTilFellesformat(
skanningmetadata = ocr,
Expand Down Expand Up @@ -165,12 +170,19 @@ class SykmeldingService(
fields(loggingMeta)
)

val ocrText = fellesformatMarshaller.toString(ocr)

val fellesformatText = fellesformatMarshaller.toString(fellesformat)

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

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

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

0 comments on commit 01489aa

Please sign in to comment.