Skip to content
Snippets Groups Projects
Verified Commit ccfd5a19 authored by Timm Fitschen's avatar Timm Fitschen
Browse files

add logging

parent c56fe00d
No related branches found
No related tags found
No related merge requests found
...@@ -66,6 +66,7 @@ import org.caosdb.server.query.CQLParser.CqContext; ...@@ -66,6 +66,7 @@ import org.caosdb.server.query.CQLParser.CqContext;
import org.caosdb.server.query.CQLParsingErrorListener.ParsingError; import org.caosdb.server.query.CQLParsingErrorListener.ParsingError;
import org.caosdb.server.transaction.TransactionInterface; import org.caosdb.server.transaction.TransactionInterface;
import org.jdom2.Element; import org.jdom2.Element;
import org.slf4j.Logger;
public class Query implements QueryInterface, ToElementable, TransactionInterface { public class Query implements QueryInterface, ToElementable, TransactionInterface {
...@@ -187,6 +188,7 @@ public class Query implements QueryInterface, ToElementable, TransactionInterfac ...@@ -187,6 +188,7 @@ public class Query implements QueryInterface, ToElementable, TransactionInterfac
ServerProperties.KEY_QUERY_FILTER_ENTITIES_WITHOUT_RETRIEVE_PERMISSIONS) ServerProperties.KEY_QUERY_FILTER_ENTITIES_WITHOUT_RETRIEVE_PERMISSIONS)
.equalsIgnoreCase("FALSE"); .equalsIgnoreCase("FALSE");
private Logger logger = org.slf4j.LoggerFactory.getLogger(getClass());
List<IdVersionPair> resultSet = null; List<IdVersionPair> resultSet = null;
private final String query; private final String query;
private Pattern entity = null; private Pattern entity = null;
...@@ -510,6 +512,9 @@ public class Query implements QueryInterface, ToElementable, TransactionInterfac ...@@ -510,6 +512,9 @@ public class Query implements QueryInterface, ToElementable, TransactionInterfac
if (this.resultSet == null) { if (this.resultSet == null) {
executeNoCache(access); executeNoCache(access);
setCache(this.query, this.resultSet); setCache(this.query, this.resultSet);
logger.debug("Uncached query {}", this.query);
} else {
logger.debug("Using cached result for {}", this.query);
} }
if (this.container != null && this.type == Type.FIND) { if (this.container != null && this.type == Type.FIND) {
for (final IdVersionPair p : this.resultSet) { for (final IdVersionPair p : this.resultSet) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment