From: Seth P. <se...@us...> - 2004-06-04 17:50:48
|
Update of /cvsroot/sunxacml/sunxacml/com/sun/xacml/attr In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7308/com/sun/xacml/attr Modified Files: AttributeDesignator.java AttributeSelector.java StandardAttributeFactory.java Log Message: Introduced some new, basic logging Index: StandardAttributeFactory.java =================================================================== RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/attr/StandardAttributeFactory.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** StandardAttributeFactory.java 24 May 2004 20:55:07 -0000 1.4 --- StandardAttributeFactory.java 4 Jun 2004 17:50:39 -0000 1.5 *************** *** 57,60 **** --- 57,62 ---- import java.util.Map; + import java.util.logging.Logger; + import org.w3c.dom.Node; *************** *** 86,89 **** --- 88,95 ---- private static Map supportedDatatypes = null; + // the logger we'll use for all messages + private static final Logger logger = + Logger.getLogger(StandardAttributeFactory.class.getName()); + /** * Private constructor that sets up proxies for all of the standard *************** *** 99,102 **** --- 105,110 ---- */ private static void initDatatypes() { + logger.config("Initializing standard datatypes"); + supportedDatatypes = new HashMap(); Index: AttributeDesignator.java =================================================================== RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/attr/AttributeDesignator.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** AttributeDesignator.java 14 May 2004 20:43:07 -0000 1.6 --- AttributeDesignator.java 4 Jun 2004 17:50:39 -0000 1.7 *************** *** 60,63 **** --- 60,66 ---- import java.util.List; + import java.util.logging.Level; + import java.util.logging.Logger; + import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; *************** *** 120,123 **** --- 123,130 ---- private URI subjectCategory; + // the logger we'll use for all messages + private static final Logger logger = + Logger.getLogger(AttributeDesignator.class.getName()); + /** * Creates a new <code>AttributeDesignator</code> without the optional *************** *** 371,374 **** --- 378,386 ---- // if it's empty, this may be an error if (mustBePresent) { + if (logger.isLoggable(Level.INFO)) + logger.info("AttributeDesignator failed to resolve a " + + "value for a required attribute: " + + id.toString()); + ArrayList code = new ArrayList(); code.add(Status.STATUS_MISSING_ATTRIBUTE); Index: AttributeSelector.java =================================================================== RCS file: /cvsroot/sunxacml/sunxacml/com/sun/xacml/attr/AttributeSelector.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** AttributeSelector.java 14 May 2004 20:43:07 -0000 1.9 --- AttributeSelector.java 4 Jun 2004 17:50:39 -0000 1.10 *************** *** 55,58 **** --- 55,61 ---- import java.util.List; + import java.util.logging.Level; + import java.util.logging.Logger; + import org.w3c.dom.NamedNodeMap; import org.w3c.dom.Node; *************** *** 86,89 **** --- 89,96 ---- private Node policyRoot; + // the logger we'll use for all messages + private static final Logger logger = + Logger.getLogger(AttributeSelector.class.getName()); + /** * Creates a new <code>AttributeSelector</code> with no policy root. *************** *** 291,294 **** --- 298,306 ---- if (mustBePresent) { // this is an error + if (logger.isLoggable(Level.INFO)) + logger.info("AttributeSelector failed to resolve a " + + "value for a required attribute: " + + contextPath); + ArrayList code = new ArrayList(); code.add(Status.STATUS_MISSING_ATTRIBUTE); |