Log levels

This commit is contained in:
Andrii Shvaika 2020-07-28 15:16:06 +03:00
parent 257f1a7ce7
commit 68cfbdeb1d
2 changed files with 4 additions and 4 deletions

View File

@ -243,8 +243,8 @@ public class DefaultAlarmQueryRepository implements AlarmQueryRepository {
}
List<Map<String, Object>> rows = jdbcTemplate.queryForList(dataQuery, ctx);
if (logSqlQueries) {
log.error("QUERY: {}", dataQuery);
Arrays.asList(ctx.getParameterNames()).forEach(param -> log.error("QUERY PARAM: {}->{}", param, ctx.getValue(param)));
log.info("QUERY: {}", dataQuery);
Arrays.asList(ctx.getParameterNames()).forEach(param -> log.info("QUERY PARAM: {}->{}", param, ctx.getValue(param)));
}
return AlarmDataAdapter.createAlarmData(pageLink, rows, totalElements, orderedEntityIds);
});

View File

@ -338,8 +338,8 @@ public class DefaultEntityQueryRepository implements EntityQueryRepository {
dataQuery = String.format("%s limit %s offset %s", dataQuery, pageLink.getPageSize(), startIndex);
}
if (logSqlQueries) {
log.error("QUERY: {}", dataQuery);
Arrays.asList(ctx.getParameterNames()).forEach(param -> log.error("QUERY PARAM: {}->{}", param, ctx.getValue(param)));
log.info("QUERY: {}", dataQuery);
Arrays.asList(ctx.getParameterNames()).forEach(param -> log.info("QUERY PARAM: {}->{}", param, ctx.getValue(param)));
}
List<Map<String, Object>> rows = jdbcTemplate.queryForList(dataQuery, ctx);
return EntityDataAdapter.createEntityData(pageLink, selectionMapping, rows, totalElements);