From 00b294c9d7ac27175c5f2c2bccd5fd2e05e2196b Mon Sep 17 00:00:00 2001 From: Sean-McCann-HG Date: Wed, 9 Oct 2024 13:58:37 +1300 Subject: [PATCH] Turned on the python logging functions to hopefully get proper errors in the UI --- .../java/nz/govt/linz/AdminBoundaries/ProcessControl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/nz/govt/linz/AdminBoundaries/ProcessControl.java b/src/main/java/nz/govt/linz/AdminBoundaries/ProcessControl.java index 0dd9b45..f74955a 100644 --- a/src/main/java/nz/govt/linz/AdminBoundaries/ProcessControl.java +++ b/src/main/java/nz/govt/linz/AdminBoundaries/ProcessControl.java @@ -342,11 +342,11 @@ public String readProcessOutput(ProcessBuilder pb, String delimiter) { final InputStream is = process.getInputStream(); BufferedReader reader = new BufferedReader(new InputStreamReader(is)); // String startTime = ZonedDateTime.now(ZoneId.of("Pacific/Auckland")).format( DateTimeFormatter.ofPattern( "uuuu.MM.dd.HH.mm.ss" )); - // LOGGER.info("Started python process with pid: " + Long.toString(process.pid()) + " at " + startTime); + LOGGER.info("Started python process with pid: " + Long.toString(process.pid()) + " at " + startTime); do { while ((line = reader.readLine()) != null) { sb2.append(line+delimiter); - //LOGGER.info("PY>"+line); + LOGGER.info("PY>"+line); } } while (process.isAlive()); @@ -355,7 +355,7 @@ public String readProcessOutput(ProcessBuilder pb, String delimiter) { sb2.append("No return value. Process exit_code="+process.exitValue()+delimiter); } // String endTime = ZonedDateTime.now(ZoneId.of("Pacific/Auckland")).format( DateTimeFormatter.ofPattern( "uuuu.MM.dd.HH.mm.ss" )); - // LOGGER.info("Exited python process with pid: " + Long.toString(process.pid()) + " at " + endTime); + LOGGER.info("Exited python process with pid: " + Long.toString(process.pid()) + " at " + endTime); } catch (IOException ioe) { LOGGER.warning("Error starting and reading process output "+ioe);