Skip to content

Commit

Permalink
[Improve][ClickhouseFile] Improve rsync log output (apache#8332)
Browse files Browse the repository at this point in the history
  • Loading branch information
caicancai authored Dec 19, 2024
1 parent 19d5325 commit 179223e
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 179223e

Please sign in to comment.