This is an automated email from the ASF dual-hosted git repository. zhongjiajie pushed a commit to branch 3.2.0-release in repository https://gitbox.apache.org/repos/asf/dolphinscheduler.git
commit 3ef25e50ccc8b1c1d45fec1fb507babaa14a78f7 Author: Aaron Wang <[email protected]> AuthorDate: Tue Sep 19 18:29:33 2023 +0800 [Fix-14895][API] Keep printing null if task log file not exist (#14912) (cherry picked from commit 2f2884fd6b052d7536ac984de4df2d24a7736a2f) --- .../apache/dolphinscheduler/api/service/impl/LoggerServiceImpl.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/LoggerServiceImpl.java b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/LoggerServiceImpl.java index ab55a8e1c5..801a8c35d4 100644 --- a/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/LoggerServiceImpl.java +++ b/dolphinscheduler-api/src/main/java/org/apache/dolphinscheduler/api/service/impl/LoggerServiceImpl.java @@ -233,9 +233,9 @@ public class LoggerServiceImpl extends BaseServiceImpl implements LoggerService log.error("Error while getting log from remote target", e); } } - - sb.append(logContent); - + if (logContent != null) { + sb.append(logContent); + } return sb.toString(); }
