Strabon

changeset 282:6af827ae80af

check whether debug level is enabled before log
author Babis Nikolaou <charnik@di.uoa.gr>
date Mon Jun 18 18:08:44 2012 +0300 (2012-06-18)
parents 21e67e71f209
children b3298617b309
files evaluation/src/main/java/org/openrdf/query/algebra/evaluation/impl/stSPARQLConstantOptimizer.java evaluation/src/main/java/org/openrdf/query/algebra/evaluation/util/StSPARQLOrderComparator.java generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBEvaluation.java generaldb/src/main/java/org/openrdf/sail/generaldb/managers/LiteralManager.java generaldb/src/main/java/org/openrdf/sail/generaldb/schema/LiteralTable.java monetdb/src/main/java/org/openrdf/sail/monetdb/evaluation/MonetDBEvaluation.java runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java
line diff
     1.1 --- a/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/impl/stSPARQLConstantOptimizer.java	Mon Jun 18 16:02:15 2012 +0300
     1.2 +++ b/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/impl/stSPARQLConstantOptimizer.java	Mon Jun 18 18:08:44 2012 +0300
     1.3 @@ -95,7 +95,7 @@
     1.4  			}
     1.5  			catch (ValueExprEvaluationException e) {
     1.6  				// TODO: incompatible values types(?), remove the affected part of the query tree
     1.7 -				logger.debug("Failed to evaluate BinaryValueOperator with two constant arguments", e);
     1.8 +				logger.error("Failed to evaluate BinaryValueOperator with two constant arguments", e);
     1.9  			}
    1.10  			catch (QueryEvaluationException e) {
    1.11  				logger.error("Query evaluation exception caught", e);
    1.12 @@ -133,7 +133,7 @@
    1.13  			}
    1.14  			catch (ValueExprEvaluationException e) {
    1.15  				// TODO: incompatible values types(?), remove the affected part of the query tree
    1.16 -				logger.debug("Failed to evaluate BinaryValueOperator with two constant arguments", e);
    1.17 +				logger.error("Failed to evaluate BinaryValueOperator with two constant arguments", e);
    1.18  			}
    1.19  			catch (QueryEvaluationException e) {
    1.20  				logger.error("Query evaluation exception caught", e);
    1.21 @@ -152,7 +152,7 @@
    1.22  				}
    1.23  				catch (ValueExprEvaluationException e) {
    1.24  					// TODO: incompatible values types(?), remove the affected part of the query tree
    1.25 -					logger.debug("Failed to evaluate BinaryValueOperator with two constant arguments", e);
    1.26 +					logger.error("Failed to evaluate BinaryValueOperator with two constant arguments", e);
    1.27  				}
    1.28  				catch (QueryEvaluationException e) {
    1.29  					logger.error("Query evaluation exception caught", e);
    1.30 @@ -172,7 +172,7 @@
    1.31  				}
    1.32  				catch (ValueExprEvaluationException e) {
    1.33  					// TODO: incompatible values types(?), remove the affected part of the query tree
    1.34 -					logger.debug("Failed to evaluate UnaryValueOperator with a constant argument", e);
    1.35 +					logger.error("Failed to evaluate UnaryValueOperator with a constant argument", e);
    1.36  				}
    1.37  				catch (QueryEvaluationException e) {
    1.38  					logger.error("Query evaluation exception caught", e);
    1.39 @@ -206,7 +206,7 @@
    1.40  				}
    1.41  				catch (ValueExprEvaluationException e) {
    1.42  					// TODO: incompatible values types(?), remove the affected part of the query tree
    1.43 -					logger.debug("Failed to evaluate BinaryValueOperator with two constant arguments", e);
    1.44 +					logger.error("Failed to evaluate BinaryValueOperator with two constant arguments", e);
    1.45  				}
    1.46  				catch (QueryEvaluationException e) {
    1.47  					logger.error("Query evaluation exception caught", e);
     2.1 --- a/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/util/StSPARQLOrderComparator.java	Mon Jun 18 16:02:15 2012 +0300
     2.2 +++ b/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/util/StSPARQLOrderComparator.java	Mon Jun 18 18:08:44 2012 +0300
     2.3 @@ -7,9 +7,6 @@
     2.4  
     2.5  import java.util.Comparator;
     2.6  
     2.7 -import org.slf4j.Logger;
     2.8 -import org.slf4j.LoggerFactory;
     2.9 -
    2.10  import org.openrdf.model.Value;
    2.11  import org.openrdf.query.BindingSet;
    2.12  import org.openrdf.query.QueryEvaluationException;
    2.13 @@ -20,8 +17,9 @@
    2.14  import org.openrdf.query.algebra.Var;
    2.15  import org.openrdf.query.algebra.evaluation.EvaluationStrategy;
    2.16  import org.openrdf.query.algebra.evaluation.ValueExprEvaluationException;
    2.17 -import org.openrdf.query.algebra.evaluation.function.spatial.SpatialConstructFunc;
    2.18  import org.openrdf.query.algebra.evaluation.function.spatial.StrabonPolyhedron;
    2.19 +import org.slf4j.Logger;
    2.20 +import org.slf4j.LoggerFactory;
    2.21  
    2.22  /**
    2.23   * @author james
    2.24 @@ -88,11 +86,11 @@
    2.25  			return 0;
    2.26  		}
    2.27  		catch (QueryEvaluationException e) {
    2.28 -			logger.debug(e.getMessage(), e);
    2.29 +			logger.error(e.getMessage(), e);
    2.30  			return 0;
    2.31  		}
    2.32  		catch (IllegalArgumentException e) {
    2.33 -			logger.debug(e.getMessage(), e);
    2.34 +			logger.error(e.getMessage(), e);
    2.35  			return 0;
    2.36  		}
    2.37  	}
     3.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBEvaluation.java	Mon Jun 18 16:02:15 2012 +0300
     3.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBEvaluation.java	Mon Jun 18 18:08:44 2012 +0300
     3.3 @@ -805,7 +805,7 @@
     3.4  			logger.debug(parameters.toString());
     3.5  		}
     3.6  		return query.toString();
     3.7 -			}
     3.8 +	}
     3.9  
    3.10  	/**
    3.11  	 * Function used to locate all ColumnVars from the select's spatial constructs so that they can later 
     4.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/managers/LiteralManager.java	Mon Jun 18 16:02:15 2012 +0300
     4.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/managers/LiteralManager.java	Mon Jun 18 18:08:44 2012 +0300
     4.3 @@ -100,7 +100,9 @@
     4.4  			/**********************************************/
     4.5  			try {
     4.6  				if (XMLGSDatatypeUtil.isNumericDatatype(datatype)) {
     4.7 -					logger.debug("about to insert double value:"+literal.doubleValue());
     4.8 +					if (logger.isDebugEnabled()) {
     4.9 +						logger.debug("about to insert double value: {}", literal.doubleValue());
    4.10 +					}
    4.11  					table.insertNumeric(id, label, dt, literal.doubleValue());
    4.12  				}
    4.13  				else if (XMLGSDatatypeUtil.isCalendarDatatype(datatype)) {
     5.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/schema/LiteralTable.java	Mon Jun 18 16:02:15 2012 +0300
     5.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/schema/LiteralTable.java	Mon Jun 18 18:08:44 2012 +0300
     5.3 @@ -230,7 +230,9 @@
     5.4  	{
     5.5  		labels.insert(id, label);
     5.6  		datatypes.insert(id, datatype);
     5.7 -		logger.debug("about to insert double value:"+value);
     5.8 +		if (logger.isDebugEnabled()) {
     5.9 +			logger.debug("about to insert double value: {}", value);
    5.10 +		}
    5.11  		numeric.insert(id, value);
    5.12  	}
    5.13  
     6.1 --- a/monetdb/src/main/java/org/openrdf/sail/monetdb/evaluation/MonetDBEvaluation.java	Mon Jun 18 16:02:15 2012 +0300
     6.2 +++ b/monetdb/src/main/java/org/openrdf/sail/monetdb/evaluation/MonetDBEvaluation.java	Mon Jun 18 18:08:44 2012 +0300
     6.3 @@ -88,7 +88,9 @@
     6.4  				result.setConstructIndexesAndNames(this.constructIndexesAndNames);
     6.5  				//
     6.6  
     6.7 -				logger.debug("In MonetDB Evaluation, query is: \n" + query);
     6.8 +				if (logger.isDebugEnabled()) {
     6.9 +					logger.debug("In MonetDB Evaluation, query is: \n{}", query);
    6.10 +				}
    6.11  				// In MonetDb this stmt.toString() returns just a reference
    6.12  				return result;
    6.13  			}
     7.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java	Mon Jun 18 16:02:15 2012 +0300
     7.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java	Mon Jun 18 18:08:44 2012 +0300
     7.3 @@ -236,7 +236,9 @@
     7.4  			return ret;
     7.5  		}
     7.6  		else if (resultsFormat.equalsIgnoreCase("XML")) {
     7.7 -			logger.debug("Serializing results (XML)");
     7.8 +			if (logger.isDebugEnabled()) {
     7.9 +				logger.debug("Serializing results (XML)");
    7.10 +			}
    7.11  			tupleQuery.evaluate(new stSPARQLResultsXMLWriter(retStream));
    7.12  		} 
    7.13  		else if (resultsFormat.equalsIgnoreCase("GeoJSON")) {