From 68a9200059c138b622598253a6f11f4308b6fb28 Mon Sep 17 00:00:00 2001 From: sebr72 Date: Fri, 20 Sep 2024 10:09:54 +0200 Subject: [PATCH] Improve logging and simplify code --- .../java/org/mapfish/print/servlet/MapPrinterServlet.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java b/core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java index d49e91457e..27b6071690 100644 --- a/core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java +++ b/core/src/main/java/org/mapfish/print/servlet/MapPrinterServlet.java @@ -645,7 +645,7 @@ public final void createReportAndGet( TimeUnit.SECONDS.toMillis(this.maxCreateAndGetWaitTimeInSeconds); long startWaitTime = System.currentTimeMillis(); while (!isDone && System.currentTimeMillis() - startWaitTime < maxWaitTimeInMillis) { - Thread.sleep(TimeUnit.SECONDS.toMillis(1)); + TimeUnit.SECONDS.sleep(1); isDone = loadReport(ref, createReportResponse, handler); } } @@ -1032,7 +1032,7 @@ private String createAndSubmitPrintJob( UUID.randomUUID() + "@" + this.servletInfo.getServletId(), httpServletRequest); MDC.put(Processor.MDC_APPLICATION_ID_KEY, appId); MDC.put(Processor.MDC_JOB_ID_KEY, ref); - LOGGER.debug("Created Ref:{} for {}", ref, specJson); + LOGGER.debug("{} created Ref:{} for {}", httpServletRequest.getRequestURI(), ref, specJson); specJson.getInternalObj().remove(JSON_OUTPUT_FORMAT); specJson.getInternalObj().put(JSON_OUTPUT_FORMAT, format);