From 0f7d82289fd50dcec3d52b5709fd558841810868 Mon Sep 17 00:00:00 2001 From: Thang Phan Date: Thu, 7 Dec 2023 15:29:40 +0100 Subject: [PATCH] Fjern logger --- .../OpprettJournalpostRequestMapper.java | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/melosys-eessi-app/src/main/java/no/nav/melosys/eessi/integration/journalpostapi/OpprettJournalpostRequestMapper.java b/melosys-eessi-app/src/main/java/no/nav/melosys/eessi/integration/journalpostapi/OpprettJournalpostRequestMapper.java index 00b76d025..5d7175472 100644 --- a/melosys-eessi-app/src/main/java/no/nav/melosys/eessi/integration/journalpostapi/OpprettJournalpostRequestMapper.java +++ b/melosys-eessi-app/src/main/java/no/nav/melosys/eessi/integration/journalpostapi/OpprettJournalpostRequestMapper.java @@ -197,11 +197,9 @@ private static ByteArrayOutputStream convertWordToPdf(SedMedVedlegg.BinaerFil bi InputStream is = new ByteArrayInputStream(binaerFil.getInnhold()); ByteArrayOutputStream out = new ByteArrayOutputStream(); - log.info("KonverteringPDF: Conversion started in convertWordToPdf"); try ( XWPFDocument document = new XWPFDocument(is) ) { - log.info("KonverteringPDF: InputStream ready"); if (konverterbarFiltype == JournalpostFiltype.DOCX) { Document pdfDocument = new Document(); @@ -214,16 +212,12 @@ private static ByteArrayOutputStream convertWordToPdf(SedMedVedlegg.BinaerFil bi pdfDocument.add(new Paragraph(paragraph.getText())); } pdfDocument.close(); - - log.info("KonverteringPDF: Conversion completed"); } else { - throw new IllegalArgumentException("KonverteringPDF: Conversion not implemented for file type " + konverterbarFiltype); + throw new IllegalArgumentException("Ikke implementert konvertering for filtype: " + konverterbarFiltype); } } catch (IOException | DocumentException | StackOverflowError e) { - throw new RuntimeException("KonverteringPDF: Could not convert attachment " + binaerFil.getFilnavn() + - " with MIME-type " + binaerFil.getMimeType() + " to PDF", e); + throw new RuntimeException("KonverteringPDF: Kunne ikke konvertere"); } - log.info("KonverteringPDF: Output stream is {}", out); return out; }