diff --git a/src/main/java/io/spaship/sidecar/services/RequestProcessor.java b/src/main/java/io/spaship/sidecar/services/RequestProcessor.java index 6183440..a454650 100644 --- a/src/main/java/io/spaship/sidecar/services/RequestProcessor.java +++ b/src/main/java/io/spaship/sidecar/services/RequestProcessor.java @@ -175,6 +175,20 @@ private void rsync(String source, String destination) throws IOException, Interr LOG.info("RSync processBuilder startpoint 3"); int exitCode = process.waitFor(); LOG.info("RSync processBuilder startpoint 4"); + + try (BufferedReader reader = new BufferedReader(new InputStreamReader(process.getInputStream())); + BufferedReader errorReader = new BufferedReader(new InputStreamReader(process.getErrorStream()))) { + + String line; + while ((line = reader.readLine()) != null) { + LOG.info("RSync output: {}", line); + } + + while ((line = errorReader.readLine()) != null) { + LOG.error("RSync error: {}", line); + } + } + if (exitCode == 0) { LOG.info("Synchronization completed successfully."); } else {