From 179223e3c2bc523dcf938d7b708fdd8d91d1a2aa Mon Sep 17 00:00:00 2001 From: Cancai Cai <77189278+caicancai@users.noreply.github.com> Date: Thu, 19 Dec 2024 10:11:25 +0800 Subject: [PATCH] [Improve][ClickhouseFile] Improve rsync log output (#8332) --- .../clickhouse/sink/file/RsyncFileTransfer.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/file/RsyncFileTransfer.java b/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/file/RsyncFileTransfer.java index 793dd6cf15c..70d217069bd 100644 --- a/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/file/RsyncFileTransfer.java +++ b/seatunnel-connectors-v2/connector-clickhouse/src/main/java/org/apache/seatunnel/connectors/seatunnel/clickhouse/sink/file/RsyncFileTransfer.java @@ -108,7 +108,15 @@ public void transferAndChown(String sourcePath, String targetPath) { BufferedReader bufferedReader = new BufferedReader(inputStreamReader)) { String line; while ((line = bufferedReader.readLine()) != null) { - log.info(line); + log.info("rsync output: {}", line); + } + } + try (InputStream errorStream = start.getErrorStream(); + InputStreamReader errorStreamReader = new InputStreamReader(errorStream); + BufferedReader bufferedReader = new BufferedReader(errorStreamReader)) { + String line; + while ((line = bufferedReader.readLine()) != null) { + log.error("rsync error: {}", line); } } start.waitFor();