未验证 提交 b3bbf69b 编写于 作者: R rickchengx 提交者: GitHub

[Improvement-11291][sql] Improvement the log output while executing multiple...

[Improvement-11291][sql] Improvement the log output while executing multiple sql statements (#11292)
上级 8cddb107
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册