From b3bbf69b2ecd44962b612e4456fe2d7d2c3530f1 Mon Sep 17 00:00:00 2001 From: rickchengx <38122586+rickchengx@users.noreply.github.com> Date: Tue, 20 Sep 2022 09:30:27 +0800 Subject: [PATCH] [Improvement-11291][sql] Improvement the log output while executing multiple sql statements (#11292) --- .../org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java b/dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java index 2a9672b11a..92bf2e6e2d 100644 --- a/dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java +++ b/dolphinscheduler-task-plugin/dolphinscheduler-task-sql/src/main/java/org/apache/dolphinscheduler/plugin/task/sql/SqlTask.java @@ -296,7 +296,6 @@ public class SqlTask extends AbstractTask { private String executeQuery(Connection connection, SqlBinds sqlBinds, String handlerType) throws Exception { try (PreparedStatement statement = prepareStatementAndBind(connection, sqlBinds)) { - logger.info("{} statement execute query, for sql: {}", handlerType, sqlBinds.getSql()); ResultSet resultSet = statement.executeQuery(); return resultProcess(resultSet); } @@ -368,7 +367,7 @@ public class SqlTask extends AbstractTask { ParameterUtils.setInParameter(entry.getKey(), stmt, prop.getType(), prop.getValue()); } } - logger.info("prepare statement replace sql : {} ", stmt); + logger.info("prepare statement replace sql : {}, sql parameters : {}", sqlBinds.getSql(), sqlBinds.getParamsMap()); return stmt; } catch (Exception exception) { throw new TaskException("SQL task prepareStatementAndBind error", exception);