|
|
|
@ -24,7 +24,6 @@ import org.springframework.jdbc.core.namedparam.ParsedSql; |
|
|
|
import org.springframework.jdbc.core.namedparam.SqlParameterSource; |
|
|
|
import org.springframework.stereotype.Component; |
|
|
|
|
|
|
|
import java.util.Arrays; |
|
|
|
import java.util.List; |
|
|
|
import java.util.UUID; |
|
|
|
|
|
|
|
@ -42,8 +41,8 @@ public class DefaultQueryLogComponent implements QueryLogComponent { |
|
|
|
if (logSqlQueries && duration > logQueriesThreshold) { |
|
|
|
|
|
|
|
String sqlToUse = substituteParametersInSqlString(query, ctx); |
|
|
|
log.warn("SLOW QUERY took {} ms: {}", sqlToUse, duration); |
|
|
|
Arrays.asList(ctx.getParameterNames()).forEach(param -> log.info("QUERY PARAM: {} -> {}", param, ctx.getValue(param))); |
|
|
|
log.warn("SLOW QUERY took {} ms: {}", duration, sqlToUse); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|