Made query logging debug only.

This commit is contained in:
Andrew Lalis 2024-02-02 12:46:53 -05:00
parent 85627fb8ad
commit 3493003588
1 changed files with 8 additions and 1 deletions

View File

@ -75,7 +75,14 @@ public class JdbcEntitySearcher<T> implements EntitySearcher<T> {
sqlBuilder.append('\n').append(pagingSql);
}
String sql = sqlBuilder.toString();
logger.info("Searching with query:\n{}\nWith arguments: {}", sql, baseQueryAndArgs.second().stream().map(Pair::second).map(Object::toString).collect(Collectors.joining(", ")));
logger.debug(
"Searching with query:\n{}\nWith arguments: {}",
sql,
baseQueryAndArgs.second().stream()
.map(Pair::second)
.map(Object::toString)
.collect(Collectors.joining(", "))
);
try (var stmt = conn.prepareStatement(sql)) {
applyArgs(stmt, baseQueryAndArgs.second());
ResultSet rs = stmt.executeQuery();