vgritsenko 2004/01/12 17:49:38
Modified: java/src/org/apache/xindice/core Collection.java
Log:
Optimize trace output
Revision Changes Path
1.45 +13 -11
xml-xindice/java/src/org/apache/xindice/core/Collection.java
Index: Collection.java
===================================================================
RCS file:
/home/cvs/xml-xindice/java/src/org/apache/xindice/core/Collection.java,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -r1.44 -r1.45
--- Collection.java 7 Jan 2004 03:57:52 -0000 1.44
+++ Collection.java 13 Jan 2004 01:49:38 -0000 1.45
@@ -713,16 +713,17 @@
*/
public final Object getEntry(Object docKey) throws DBException {
- /*
- * I would prefer to throw an exception (NPE) in this case,
- * but we have a test indicating a null return...
- */
+ // I would prefer to throw an exception (NPE) in this case,
+ // but we have a test indicating a null return...
if (docKey == null) {
return null;
}
- final String localDebugHeader = debugHeader() + "getEntry: docKey=<"
+ docKey + ">: ";
- log.trace(localDebugHeader);
+ String localDebugHeader = null;
+ if (log.isTraceEnabled()) {
+ localDebugHeader = debugHeader() + "getEntry: docKey=<" + docKey
+ ">: ";
+ log.trace(localDebugHeader);
+ }
checkFiler(FaultCodes.COL_NO_FILER);
@@ -1267,10 +1268,11 @@
* @return The resulting NodeSet
*/
public final NodeSet queryCollection(String style, String query,
NamespaceMap nsMap) throws DBException {
- if (log.isInfoEnabled()) {
- log.info(debugHeader() + "Query collection, query " + query);
+ if (log.isDebugEnabled()) {
+ log.debug(debugHeader() + "Query collection, query " + query);
}
- // a collection in which you are unable to file documents will have
no filer
+
+ // A collection in which you are unable to file documents will have
no filer
// (for example the root collection). Rather than throwing an
exception return
// a constant result (nothing)
return null == filer ? EMPTY_NODESET : getQueryEngine().query(this,
style, query, nsMap, null);