Improved logging

This commit is contained in:
Luca Frosini 2021-04-01 09:40:59 +02:00
parent aae19295ca
commit 4d3e97a922
2 changed files with 5 additions and 0 deletions

View File

@ -106,6 +106,7 @@ public class AccountingPersistenceQueryPostgreSQL implements AccountingPersisten
Set<String> requestedTableField = query.getRequestedTableField();
RecordToDBFields recordToDBMapper = query.getRecordToDBMapper();
logger.trace("Going to request the following query: {}", sql);
ResultSet resultSet = statement.executeQuery(sql);
while (resultSet.next()) {
@ -207,6 +208,7 @@ public class AccountingPersistenceQueryPostgreSQL implements AccountingPersisten
// List<String> requestedTableField = query.getRequestedTableField();
RecordToDBFields recordToDBMapper = query.getRecordToDBMapper();
logger.trace("Going to request the following query: {}", sql);
ResultSet resultSet = statement.executeQuery(sql);
String tableFieldORderingProperty = recordToDBMapper.getTableField(orderingProperty);
@ -318,6 +320,8 @@ public class AccountingPersistenceQueryPostgreSQL implements AccountingPersisten
String sql = query.getDinstinctValuesQuery();
SortedSet<String> providersIds = new TreeSet<>();
logger.trace("Going to request the following query: {}", sql);
ResultSet resultSet = statement.executeQuery(sql);
while (resultSet.next()) {

View File

@ -189,6 +189,7 @@ public class AccountingPersistenceQueryPostgreSQLTest extends ContextTest {
logger.debug("{}", numberedFilter);
}
logger.debug("----Only first 3 results");
numberedFilters = accountingPersistenceQueryPostgreSQL.getFilterValues(clz, temporalConstraint, filters, key, 3);
for(NumberedFilter numberedFilter : numberedFilters) {
logger.debug("{}", numberedFilter);