jmcnally 02/01/24 10:29:53
Modified: src/services/java/org/apache/fulcrum/intake/model Group.java
Log:
provide some useful debugging logging
Revision Changes Path
1.6 +16 -0
jakarta-turbine-fulcrum/src/services/java/org/apache/fulcrum/intake/model/Group.java
Index: Group.java
===================================================================
RCS file:
/home/cvs/jakarta-turbine-fulcrum/src/services/java/org/apache/fulcrum/intake/model/Group.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Group.java 28 Oct 2001 19:52:05 -0000 1.5
+++ Group.java 24 Jan 2002 18:29:53 -0000 1.6
@@ -67,6 +67,7 @@
import org.apache.fulcrum.util.parser.ValueParser;
import org.apache.fulcrum.ServiceException;
import org.apache.fulcrum.pool.Recyclable;
+import org.apache.log4j.Category;
/** Holds a group of Fields */
public class Group
@@ -79,6 +80,15 @@
*/
public static final String NEW = "_0";
+ private static final Category log;
+ private static final boolean isDebugEnabled;
+
+ static
+ {
+ log = Category.getInstance(Group.class.getName());
+ isDebugEnabled = log.isDebugEnabled();
+ }
+
/**
* The key used to represent this group in a parameter.
* This key is usually a prefix as part of a field key.
@@ -355,6 +365,12 @@
for (int i=fieldsArray.length-1; i>=0; i--)
{
valid &= fieldsArray[i].isValid();
+ if ( isDebugEnabled && !fieldsArray[i].isValid())
+ {
+ log.debug("[Intake] Group(" + oid + "): " + name + "; Field: "
+ + fieldsArray[i].name + "; value=" +
+ fieldsArray[i].getValue() + " is invalid!");
+ }
}
return valid;
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>