r=rlubke
Jayashri Visvanathan wrote:
> Move to JDK 1.4 logging (last phase)
>
> M src/com/sun/faces/config/ConfigureListener.java
> M src/com/sun/faces/config/ManagedBeanFactory.java
> M src/com/sun/faces/context/FacesContextImpl.java
> M src/com/sun/faces/lifecycle/ApplyRequestValuesPhase.java
> M src/com/sun/faces/lifecycle/InvokeApplicationPhase.java
> M src/com/sun/faces/lifecycle/LifecycleFactoryImpl.java
> M src/com/sun/faces/lifecycle/LifecycleImpl.java
> Fix for JSF RI 136. When JSF 2.1 container is not available
> do not populate FacesCompositeELResolver stack.
>
> M src/com/sun/faces/lifecycle/ProcessValidationsPhase.java
> M src/com/sun/faces/lifecycle/RenderResponsePhase.java
> M src/com/sun/faces/lifecycle/RestoreViewPhase.java
> M src/com/sun/faces/lifecycle/UpdateModelValuesPhase.java
> M src/com/sun/faces/util/Util.java
>
>------------------------------------------------------------------------
>
>Index: src/com/sun/faces/config/ConfigureListener.java
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/config/ConfigureListener.java,v
>retrieving revision 1.37
>diff -u -r1.37 ConfigureListener.java
>--- src/com/sun/faces/config/ConfigureListener.java 15 Jun 2005 20:42:25 -0000 1.37
>+++ src/com/sun/faces/config/ConfigureListener.java 23 Jun 2005 18:36:25 -0000
>@@ -77,13 +77,14 @@
> import com.sun.faces.util.Util;
>
> import org.apache.commons.digester.Digester;
>-import org.apache.commons.logging.Log;
>-import org.apache.commons.logging.LogFactory;
> import org.xml.sax.Attributes;
> import org.xml.sax.InputSource;
> import org.xml.sax.SAXException;
> import org.xml.sax.helpers.DefaultHandler;
>
>+import java.util.logging.Logger;
>+import java.util.logging.Level;
>+
>
> /**
> * <p>Parse all relevant JavaServer Faces configuration resources, and
>@@ -201,7 +202,10 @@
> /**
> * <p>The <code>Log</code> instance for this class.</p>
> */
>- private static Log log = LogFactory.getLog(ConfigureListener.class);
>+ // Log instance for this class
>+ private static Logger logger = Util.getLogger(Util.FACES_LOGGER
>+ + Util.CONFIG_LOGGER);
>+
>
> private VariableResolver legacyVRChainHead = null;
> private PropertyResolver legacyPRChainHead = null;
>@@ -251,17 +255,17 @@
> if (!isFeatureEnabled(context, FORCE_LOAD_CONFIG)) {
> WebXmlProcessor processor = new WebXmlProcessor(context);
> if (!processor.isFacesServletPresent()) {
>- if (log.isDebugEnabled()) {
>- log.debug("No FacesServlet found in deployment descriptor -" +
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("No FacesServlet found in deployment descriptor -" +
> " bypassing configuration.");
> }
> return;
> }
>
>- if (log.isDebugEnabled()) {
>- log.debug("FacesServlet found in deployment descriptor -" +
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("FacesServlet found in deployment descriptor -" +
> " processing configuration.");
>- }
>+ }
> }
>
> // Prepare local variables we will need
>@@ -283,8 +287,8 @@
> }
> }
> catch (Exception e) {
>- if (log.isDebugEnabled()) {
>- log.debug("Can't query for test environment");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Can't query for test environment");
> }
> }
>
>@@ -293,8 +297,8 @@
> isFeatureEnabled(context, ENABLE_HTML_TLV));
>
> URL url = null;
>- if (log.isDebugEnabled()) {
>- log.debug("contextInitialized(" + context.getServletContextName()
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("contextInitialized(" + context.getServletContextName()
> + ")");
> }
>
>@@ -330,7 +334,9 @@
> message = "Can't parse configuration file:" +
> META_INF_RESOURCES;
> }
>- log.warn(message, e);
>+ if ( logger.isLoggable(Level.WARNING)) {
>+ logger.log(Level.WARNING, message, e);
>+ }
> throw new FacesException(message, e);
> }
> while (resources.hasNext()) {
>@@ -388,8 +394,8 @@
> public void contextDestroyed(ServletContextEvent sce) {
>
> ServletContext context = sce.getServletContext();
>- if (log.isDebugEnabled()) {
>- log.debug("contextDestroyed(" + context.getServletContextName()
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("contextDestroyed(" + context.getServletContextName()
> + ')');
> }
>
>@@ -475,16 +481,16 @@
>
> value = config.getMessageBundle();
> if (value != null) {
>- if (log.isTraceEnabled()) {
>- log.trace("setMessageBundle(" + value + ')');
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("setMessageBundle(" + value + ')');
> }
> application.setMessageBundle(value);
> }
>
> value = config.getDefaultRenderKitId();
> if (value != null) {
>- if (log.isTraceEnabled()) {
>- log.trace("setDefaultRenderKitId(" + value + ')');
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("setDefaultRenderKitId(" + value + ')');
> }
> application.setDefaultRenderKitId(value);
> }
>@@ -494,8 +500,8 @@
> values = config.getActionListeners();
> if ((values != null) && (values.length > 0)) {
> for (int i = 0; i < values.length; i++) {
>- if (log.isTraceEnabled()) {
>- log.trace("setActionListener(" + values[i] + ')');
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("setActionListener(" + values[i] + ')');
> }
> instance = Util.createInstance
> (values[i], ActionListener.class,
>@@ -509,8 +515,8 @@
> values = config.getNavigationHandlers();
> if ((values != null) && (values.length > 0)) {
> for (int i = 0; i < values.length; i++) {
>- if (log.isTraceEnabled()) {
>- log.trace("setNavigationHandler(" + values[i] + ')');
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("setNavigationHandler(" + values[i] + ')');
> }
> instance = Util.createInstance
> (values[i], NavigationHandler.class,
>@@ -528,8 +534,8 @@
> // to satisfy decorator pattern
> prevInChain = new DummyPropertyResolverImpl();
> for (int i = 0; i < values.length; i++) {
>- if (log.isTraceEnabled()) {
>- log.trace("setPropertyResolver(" + values[i] + ')');
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("setPropertyResolver(" + values[i] + ')');
> }
> instance = Util.createInstance(values[i],
> PropertyResolver.class, prevInChain);
>@@ -548,8 +554,8 @@
> values = config.getELResolvers();
> if ((values != null) && (values.length > 0)) {
> for (int i = 0; i < values.length; i++) {
>- if (log.isTraceEnabled()) {
>- log.trace("setELResolver(" + values[i] + ')');
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("setELResolver(" + values[i] + ')');
> }
> instance = Util.createInstance(values[i]);
> if (elResolversFromFacesConfig == null) {
>@@ -563,8 +569,8 @@
> values = config.getStateManagers();
> if ((values != null) && (values.length > 0)) {
> for (int i = 0; i < values.length; i++) {
>- if (log.isTraceEnabled()) {
>- log.trace("setStateManager(" + values[i] + ')');
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("setStateManager(" + values[i] + ')');
> }
> instance = Util.createInstance
> (values[i], StateManager.class,
>@@ -583,8 +589,8 @@
> // satisfy decorator pattern
> prevInChain = new DummyVariableResolverImpl();
> for (int i = 0; i < values.length; i++) {
>- if (log.isTraceEnabled()) {
>- log.trace("setVariableResolver(" + values[i] + ')');
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("setVariableResolver(" + values[i] + ')');
> }
> instance = Util.createInstance
> (values[i], VariableResolver.class, prevInChain);
>@@ -602,8 +608,8 @@
> values = config.getViewHandlers();
> if ((values != null) && (values.length > 0)) {
> for (int i = 0; i < values.length; i++) {
>- if (log.isTraceEnabled()) {
>- log.trace("setViewHandler(" + values[i] + ')');
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("setViewHandler(" + values[i] + ')');
> }
> instance = Util.createInstance
> (values[i], ViewHandler.class,
>@@ -632,8 +638,8 @@
> Application application = application();
>
> for (int i = 0; i < config.length; i++) {
>- if (log.isTraceEnabled()) {
>- log.trace("addComponent(" +
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("addComponent(" +
> config[i].getComponentType() + ',' +
> config[i].getComponentClass() + ')');
> }
>@@ -656,8 +662,8 @@
>
> // at a minimum, configure the primitive converters
> for (i = 0, len = PRIM_CLASSES_TO_CONVERT.length; i < len; i++) {
>- if (log.isTraceEnabled()) {
>- log.trace("addConverterByClass(" +
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("addConverterByClass(" +
> PRIM_CLASSES_TO_CONVERT[i] + ',' +
> CONVERTERS_FOR_PRIMS[i] + ')');
> }
>@@ -671,16 +677,16 @@
>
> for (i = 0, len = config.length; i < len; i++) {
> if (config[i].getConverterId() != null) {
>- if (log.isTraceEnabled()) {
>- log.trace("addConverterById(" +
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("addConverterById(" +
> config[i].getConverterId() + ',' +
> config[i].getConverterClass() + ')');
> }
> application.addConverter(config[i].getConverterId(),
> config[i].getConverterClass());
> } else {
>- if (log.isTraceEnabled()) {
>- log.trace("addConverterByClass(" +
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("addConverterByClass(" +
> config[i].getConverterForClass() + ',' +
> config[i].getConverterClass() + ')');
> }
>@@ -712,8 +718,8 @@
> while (iter.hasNext()) {
> value = (String) iter.next();
> if (value != null) {
>- if (log.isTraceEnabled()) {
>- log.trace("setApplicationFactory(" + value + ')');
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("setApplicationFactory(" + value + ')');
> }
> FactoryFinder.setFactory(FactoryFinder.APPLICATION_FACTORY,
> value);
>@@ -724,8 +730,8 @@
> while (iter.hasNext()) {
> value = (String) iter.next();
> if (value != null) {
>- if (log.isTraceEnabled()) {
>- log.trace("setFacesContextFactory(" + value + ')');
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("setFacesContextFactory(" + value + ')');
> }
> FactoryFinder.setFactory(FactoryFinder.FACES_CONTEXT_FACTORY,
> value);
>@@ -736,8 +742,8 @@
> while (iter.hasNext()) {
> value = (String) iter.next();
> if (value != null) {
>- if (log.isTraceEnabled()) {
>- log.trace("setLifecycleFactory(" + value + ')');
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("setLifecycleFactory(" + value + ')');
> }
> FactoryFinder.setFactory(FactoryFinder.LIFECYCLE_FACTORY,
> value);
>@@ -748,8 +754,8 @@
> while (iter.hasNext()) {
> value = (String) iter.next();
> if (value != null) {
>- if (log.isTraceEnabled()) {
>- log.trace("setRenderKitFactory(" + value + ')');
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("setRenderKitFactory(" + value + ')');
> }
> FactoryFinder.setFactory(FactoryFinder.RENDER_KIT_FACTORY,
> value);
>@@ -782,8 +788,8 @@
> Lifecycle lifecycle =
> factory.getLifecycle(lifecycleId);
> for (int i = 0; i < listeners.length; i++) {
>- if (log.isTraceEnabled()) {
>- log.trace("addPhaseListener(" + listeners[i] + ')');
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("addPhaseListener(" + listeners[i] + ')');
> }
> Class clazz = Util.loadClass(listeners[i], this);
> lifecycle.addPhaseListener((PhaseListener) clazz.newInstance());
>@@ -809,8 +815,8 @@
>
> value = config.getDefaultLocale();
> if (value != null) {
>- if (log.isTraceEnabled()) {
>- log.trace("setDefaultLocale(" + value + ')');
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("setDefaultLocale(" + value + ')');
> }
> application.setDefaultLocale
> (Util.getLocaleFromString(value));
>@@ -820,8 +826,8 @@
> if ((values != null) && (values.length > 0)) {
> List locales = new ArrayList();
> for (int i = 0; i < values.length; i++) {
>- if (log.isTraceEnabled()) {
>- log.trace("addSupportedLocale(" + values[i] + ')');
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("addSupportedLocale(" + values[i] + ')');
> }
> locales.add(Util.getLocaleFromString(values[i]));
> }
>@@ -852,8 +858,8 @@
> }
>
> for (int i = 0; i < config.length; i++) {
>- if (log.isTraceEnabled()) {
>- log.trace("addManagedBean(" +
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("addManagedBean(" +
> config[i].getManagedBeanName() + ',' +
> config[i].getManagedBeanClass() + ')');
> }
>@@ -883,14 +889,14 @@
> }
>
> for (int i = 0; i < config.length; i++) {
>- if (log.isTraceEnabled()) {
>- log.trace("addNavigationRule(" +
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("addNavigationRule(" +
> config[i].getFromViewId() + ')');
> }
> NavigationCaseBean[] ncb = config[i].getNavigationCases();
> for (int j = 0; j < ncb.length; j++) {
>- if (log.isTraceEnabled()) {
>- log.trace("addNavigationCase(" +
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("addNavigationCase(" +
> ncb[j].getFromAction() + ',' +
> ncb[j].getFromOutcome() + ',' +
> ncb[j].isRedirect() + ',' +
>@@ -945,8 +951,8 @@
> }
>
> for (int i = 0; i < config.length; i++) {
>- if (log.isTraceEnabled()) {
>- log.trace("addRenderer(" +
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("addRenderer(" +
> config[i].getComponentFamily() + ',' +
> config[i].getRendererType() + ',' +
> config[i].getRendererClass() + ')');
>@@ -980,8 +986,8 @@
> RenderKit rk = rkFactory.getRenderKit
> (null, config[i].getRenderKitId());
> if (rk == null) {
>- if (log.isTraceEnabled()) {
>- log.trace("createRenderKit(" +
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("createRenderKit(" +
> config[i].getRenderKitId() + ',' +
> config[i].getRenderKitClass() + ')');
> }
>@@ -995,8 +1001,8 @@
> config[i].getRenderKitClass(), this).newInstance();
> rkFactory.addRenderKit(config[i].getRenderKitId(), rk);
> } else {
>- if (log.isTraceEnabled()) {
>- log.trace("getRenderKit(" +
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("getRenderKit(" +
> config[i].getRenderKitId() + ')');
> }
> }
>@@ -1020,8 +1026,8 @@
> Application application = application();
>
> for (int i = 0; i < config.length; i++) {
>- if (log.isTraceEnabled()) {
>- log.trace("addValidator(" +
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("addValidator(" +
> config[i].getValidatorId() + ',' +
> config[i].getValidatorClass() + ')');
> }
>@@ -1085,13 +1091,13 @@
> synchronized (loaders) {
> if (!loaders.contains(cl)) {
> loaders.add(cl);
>- if (log.isTraceEnabled()) {
>- log.trace("Initializing this webapp");
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("Initializing this webapp");
> }
> return false;
> } else {
>- if (log.isTraceEnabled()) {
>- log.trace("Listener already completed for this webapp");
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("Listener already completed for this webapp");
> }
> return true;
> }
>@@ -1113,8 +1119,8 @@
> private void verifyObjects(ServletContext context, FacesConfigBean fcb)
> throws FacesException {
>
>- if (log.isDebugEnabled()) {
>- log.debug("Verifying application objects");
>+ if (logger.isLoggable(Level.FINER)) {
>+ logger.finer("Verifying application objects");
> }
>
> ApplicationFactory af = (ApplicationFactory)
>@@ -1209,13 +1215,13 @@
> "cannot be created. See your web application logs " +
> "for details.";
> }
>- if (log.isErrorEnabled()) {
>- log.error(message);
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.warning(message);
> }
> throw new FacesException(message);
> } else {
>- if (log.isInfoEnabled()) {
>- log.info(
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine(
> "Application object verification completed successfully");
> }
> }
>@@ -1233,8 +1239,8 @@
> */
> protected void parse(Digester digester, URL url, FacesConfigBean fcb) {
>
>- if (log.isDebugEnabled()) {
>- log.debug("parse(" + url.toExternalForm() + ')');
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("parse(" + url.toExternalForm() + ')');
> }
>
> URLConnection conn = null;
>@@ -1259,8 +1265,8 @@
> message = "Can't parse configuration file:" +
> url.toExternalForm();
> }
>- if (log.isErrorEnabled()) {
>- log.error(message, e);
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.log(Level.WARNING, message, e);
> }
> throw new FacesException(message, e);
> } finally {
>@@ -1293,8 +1299,8 @@
> if (!(paramValue.equals("true")) &&
> !(paramValue.equals("false"))) {
>
>- if (log.isWarnEnabled()) {
>- log.warn(Util.getExceptionMessageString(
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.warning(Util.getExceptionMessageString(
> Util.INVALID_INIT_PARAM_ERROR_MESSAGE_ID,
> new Object[] { paramValue, paramName }));
> }
>@@ -1331,8 +1337,10 @@
> jspFactory.getClass().getMethod("getJspApplicationContext", new Class[] {
> ServletContext.class });
> } catch (NoSuchMethodException nsme) {
>- log.warn(Util.getExceptionMessage(Util.INCORRECT_JSP_VERSION_ID,
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.warning(Util.getExceptionMessageString(Util.INCORRECT_JSP_VERSION_ID,
> new Object [] { "getJspApplicationContext" }));
>+ }
> return;
> }
>
>@@ -1681,8 +1689,8 @@
> // processing the web.xml, set facesServletFound to true to
> // default to our previous behavior of processing the faces
> // configuration.
>- if (log.isWarnEnabled()) {
>- log.warn("Unable to process deployment descriptor for" +
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.warning("Unable to process deployment descriptor for" +
> " context '" + context.getServletContextName() + '\'');
> }
> facesServletPresent = true;
>Index: src/com/sun/faces/config/ManagedBeanFactory.java
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/config/ManagedBeanFactory.java,v
>retrieving revision 1.30
>diff -u -r1.30 ManagedBeanFactory.java
>--- src/com/sun/faces/config/ManagedBeanFactory.java 10 Jun 2005 21:59:54 -0000 1.30
>+++ src/com/sun/faces/config/ManagedBeanFactory.java 23 Jun 2005 18:36:25 -0000
>@@ -34,8 +34,8 @@
> import com.sun.faces.util.Util;
>
> import org.apache.commons.beanutils.PropertyUtils;
>-import org.apache.commons.logging.Log;
>-import org.apache.commons.logging.LogFactory;
>+import java.util.logging.Logger;
>+import java.util.logging.Level;
>
> /**
> * <p>This class creates a managed bean instance. It has a contract with
>@@ -102,7 +102,8 @@
> /**
> * <p>The <code>Log</code> instance for this class.</p>
> */
>- private static Log log = LogFactory.getLog(ManagedBeanFactory.class);
>+ private static Logger logger = Util.getLogger(Util.FACES_LOGGER
>+ + Util.CONFIG_LOGGER);
>
>
>
>@@ -153,8 +154,8 @@
>
> public Map getManagedBeanFactoryMap() {
> if (null == managedBeanFactoryMap) {
>- if (log.isDebugEnabled()) {
>- log.trace("Contract violation: ManagedBeanFactory must be initialized with managedBeanFactoryMap after instantiation.");
>+ if (logger.isLoggable(Level.INFO)) {
>+ logger.info("Contract violation: ManagedBeanFactory must be initialized with managedBeanFactoryMap after instantiation.");
> }
> }
>
>@@ -204,8 +205,8 @@
> }
>
> if ( beanList.contains(managedBean.getManagedBeanName())) {
>- if ( log.isErrorEnabled()) {
>- log.error("Possible cyclic reference to managedBean " +
>+ if ( logger.isLoggable(Level.WARNING)) {
>+ logger.warning("Possible cyclic reference to managedBean " +
> managedBean.getManagedBeanName() + " ");
> }
> Object[] obj = new Object[1];
>@@ -414,8 +415,8 @@
> int len = 0;
>
> if (0 == (len = valuesFromConfig.length)) {
>- if (log.isTraceEnabled()) {
>- log.trace("zero length array");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("zero length array");
> }
> return null;
> }
>@@ -463,8 +464,8 @@
> strValue = null;
>
> if (null == mapEntries || 0 == valuesFromConfig.length) {
>- if (log.isTraceEnabled()) {
>- log.trace("null or zero length array");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("null or zero length array");
> }
> return;
> }
>Index: src/com/sun/faces/context/FacesContextImpl.java
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/context/FacesContextImpl.java,v
>retrieving revision 1.68
>diff -u -r1.68 FacesContextImpl.java
>--- src/com/sun/faces/context/FacesContextImpl.java 5 May 2005 20:51:21 -0000 1.68
>+++ src/com/sun/faces/context/FacesContextImpl.java 23 Jun 2005 18:36:25 -0000
>@@ -11,8 +11,9 @@
>
> import com.sun.faces.util.Util;
> import org.apache.commons.collections.CursorableLinkedList;
>-import org.apache.commons.logging.Log;
>-import org.apache.commons.logging.LogFactory;
>+
>+import java.util.logging.Logger;
>+import java.util.logging.Level;
>
> import javax.faces.FactoryFinder;
> import javax.faces.application.Application;
>@@ -49,7 +50,9 @@
> // Class Variables
> //
>
>- private static final Log log = LogFactory.getLog(FacesContextImpl.class);
>+ // Log instance for this class
>+ private static Logger logger = Util.getLogger(Util.FACES_LOGGER
>+ + Util.CONTEXT_LOGGER);
>
> //
> // Instance Variables
>@@ -299,12 +302,13 @@
> facesEvents = new CursorableLinkedList();
> }
> facesEvents.add(event);
>- if (log.isDebugEnabled()) {
>+
>+ if (logger.isLoggable(Level.FINE)) {
> String id = event.getComponent().getId();
> if (id == null) {
> id = "<<NONE>>";
> }
>- log.debug("Adding FacesEvent[sourceId=" + id +
>+ logger.fine("Adding FacesEvent[sourceId=" + id +
> ",type=" + event.getClass().getName());
> }
>
>@@ -332,9 +336,8 @@
> componentMessageLists.put(clientId, list);
> }
> list.add(message);
>-
>- if (log.isDebugEnabled()) {
>- log.debug("Adding Message[sourceId=" +
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Adding Message[sourceId=" +
> (clientId != null ? clientId : "<<NONE>>") +
> ",summary=" + message.getSummary() + ")");
> }
>Index: src/com/sun/faces/lifecycle/ApplyRequestValuesPhase.java
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/ApplyRequestValuesPhase.java,v
>retrieving revision 1.19
>diff -u -r1.19 ApplyRequestValuesPhase.java
>--- src/com/sun/faces/lifecycle/ApplyRequestValuesPhase.java 16 May 2005 20:16:19 -0000 1.19
>+++ src/com/sun/faces/lifecycle/ApplyRequestValuesPhase.java 23 Jun 2005 18:36:25 -0000
>@@ -14,8 +14,10 @@
> import javax.faces.context.FacesContext;
> import javax.faces.event.PhaseId;
>
>-import org.apache.commons.logging.Log;
>-import org.apache.commons.logging.LogFactory;
>+import java.util.logging.Logger;
>+import java.util.logging.Level;
>+
>+import com.sun.faces.util.Util;
>
> /**
> * ApplyRequestValuesPhase executes <code>processDecodes</code> on each
>@@ -37,8 +39,8 @@
> // Instance Variables
> //
> // Log instance for this class
>- private static final Log log =
>- LogFactory.getLog(ApplyRequestValuesPhase.class);
>+ private static Logger logger = Util.getLogger(Util.FACES_LOGGER
>+ + Util.LIFECYCLE_LOGGER);
>
> // Relationship Instance Variables
>
>@@ -68,8 +70,8 @@
>
> public void execute(FacesContext facesContext) throws FacesException {
>
>- if (log.isDebugEnabled()) {
>- log.debug("Entering ApplyRequestValuesPhase");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Entering ApplyRequestValuesPhase");
> }
>
> UIComponent component = facesContext.getViewRoot();
>@@ -80,14 +82,14 @@
> } catch (RuntimeException re) {
> String exceptionMessage = re.getMessage();
> if (null != exceptionMessage) {
>- if (log.isErrorEnabled()) {
>- log.error(exceptionMessage, re);
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.log(Level.WARNING,exceptionMessage, re);
> }
>
> }
> throw new FacesException(exceptionMessage, re);
> }
>- if (log.isDebugEnabled()) {
>- log.debug("Exiting ApplyRequestValuesPhase");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Exiting ApplyRequestValuesPhase");
> }
> }
>
>Index: src/com/sun/faces/lifecycle/InvokeApplicationPhase.java
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/InvokeApplicationPhase.java,v
>retrieving revision 1.17
>diff -u -r1.17 InvokeApplicationPhase.java
>--- src/com/sun/faces/lifecycle/InvokeApplicationPhase.java 16 May 2005 20:16:20 -0000 1.17
>+++ src/com/sun/faces/lifecycle/InvokeApplicationPhase.java 23 Jun 2005 18:36:25 -0000
>@@ -16,8 +16,10 @@
> import javax.faces.context.FacesContext;
> import javax.faces.event.PhaseId;
>
>-import org.apache.commons.logging.Log;
>-import org.apache.commons.logging.LogFactory;
>+import java.util.logging.Logger;
>+import java.util.logging.Level;
>+
>+import com.sun.faces.util.Util;
>
> /**
> * <B>Lifetime And Scope</B> <P> Same lifetime and scope as
>@@ -28,29 +30,29 @@
>
> public class InvokeApplicationPhase extends Phase {
>
>-//
>-// Protected Constants
>-//
>-
>-//
>-// Class Variables
>-//
>+ //
>+ // Protected Constants
>+ //
>+
>+ //
>+ // Class Variables
>+ //
>
> // Log instance for this class
>- private static final Log log =
>- LogFactory.getLog(InvokeApplicationPhase.class);
>+ private static Logger logger = Util.getLogger(Util.FACES_LOGGER
>+ + Util.LIFECYCLE_LOGGER);
>
>-//
>-// Instance Variables
>-//
>+ //
>+ // Instance Variables
>+ //
>
>-// Attribute Instance Variables
>+ // Attribute Instance Variables
>
>-// Relationship Instance Variables
>+ // Relationship Instance Variables
>
>-//
>-// Constructors and Genericializers
>-//
>+ //
>+ // Constructors and Genericializers
>+ //
>
> public InvokeApplicationPhase() {
> super();
>@@ -64,8 +66,8 @@
>
> public void execute(FacesContext facesContext) throws FacesException {
>
>- if (log.isDebugEnabled()) {
>- log.debug("Entering InvokeApplicationsPhase");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Entering InvokeApplicationsPhase");
> }
>
> UIViewRoot root = facesContext.getViewRoot();
>@@ -76,15 +78,15 @@
> } catch (RuntimeException re) {
> String exceptionMessage = re.getMessage();
> if (null != exceptionMessage) {
>- if (log.isErrorEnabled()) {
>- log.error(exceptionMessage, re);
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.log(Level.WARNING, exceptionMessage, re);
> }
> }
> throw new FacesException(exceptionMessage, re);
> }
>
>- if (log.isDebugEnabled()) {
>- log.debug("Exiting InvokeApplicationsPhase");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Exiting InvokeApplicationsPhase");
> }
> }
>
>Index: src/com/sun/faces/lifecycle/LifecycleFactoryImpl.java
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/LifecycleFactoryImpl.java,v
>retrieving revision 1.23
>diff -u -r1.23 LifecycleFactoryImpl.java
>--- src/com/sun/faces/lifecycle/LifecycleFactoryImpl.java 16 May 2005 20:16:20 -0000 1.23
>+++ src/com/sun/faces/lifecycle/LifecycleFactoryImpl.java 23 Jun 2005 18:36:25 -0000
>@@ -21,8 +21,8 @@
>
> import com.sun.faces.util.Util;
>
>-import org.apache.commons.logging.Log;
>-import org.apache.commons.logging.LogFactory;
>+import java.util.logging.Logger;
>+import java.util.logging.Level;
>
> /**
> * <B>LifecycleFactoryImpl</B> is the stock implementation of Lifecycle
>@@ -34,34 +34,34 @@
>
> public class LifecycleFactoryImpl extends LifecycleFactory {
>
>-//
>-// Protected Constants
>-//
>+ //
>+ // Protected Constants
>+ //
> static final int FIRST_PHASE = PhaseId.RESTORE_VIEW.getOrdinal();
> static final int LAST_PHASE = PhaseId.RENDER_RESPONSE.getOrdinal();
>
>-// Log instance for this class
>- private static final Log log =
>- LogFactory.getLog(LifecycleFactoryImpl.class);
>+ // Log instance for this class
>+ private static Logger logger = Util.getLogger(Util.FACES_LOGGER
>+ + Util.LIFECYCLE_LOGGER);
>
>-//
>-// Class Variables
>-//
>+ //
>+ // Class Variables
>+ //
>
>-//
>-// Instance Variables
>-//
>+ //
>+ // Instance Variables
>+ //
>
>-// Attribute Instance Variables
>+ // Attribute Instance Variables
>
>-// Relationship Instance Variables
>+ // Relationship Instance Variables
>
> protected HashMap lifecycleMap = null;
> protected Object lock = null;
>
>-//
>-// Constructors and Initializers
>-//
>+ //
>+ // Constructors and Initializers
>+ //
>
> public LifecycleFactoryImpl() {
> super();
>@@ -71,8 +71,8 @@
> lifecycleMap.put(LifecycleFactory.DEFAULT_LIFECYCLE,
> new LifecycleWrapper(new LifecycleImpl(),
> false));
>- if (log.isDebugEnabled()) {
>- log.debug("Created Default Lifecycle");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Created Default Lifecycle");
> }
> lock = new Object();
> }
>@@ -117,8 +117,8 @@
> message = Util.getExceptionMessageString(
> Util.LIFECYCLE_ID_NOT_FOUND_ERROR_MESSAGE_ID,
> params);
>- if (log.isErrorEnabled()) {
>- log.error("Error: " + message);
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.warning(message);
> }
> throw new IllegalArgumentException(message);
> }
>@@ -129,8 +129,8 @@
> message = Util.getExceptionMessageString(
> Util.LIFECYCLE_ID_ALREADY_ADDED_ID,
> params);
>- if (log.isErrorEnabled()) {
>- log.error("Error: " + message);
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.warning(message);
> }
> throw new IllegalStateException(message);
> }
>@@ -141,8 +141,8 @@
> message = Util.getExceptionMessageString(
> Util.PHASE_ID_OUT_OF_BOUNDS_ERROR_MESSAGE_ID,
> params);
>- if (log.isErrorEnabled()) {
>- log.error("Error: " + message);
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.warning(message);
> }
> throw new IllegalArgumentException(message);
> }
>@@ -163,14 +163,15 @@
> String message =
> Util.getExceptionMessageString(Util.LIFECYCLE_ID_ALREADY_ADDED_ID,
> params);
>- if (log.isErrorEnabled()) {
>- log.error("addLifecycle: " + message);
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.warning(Util.getExceptionMessageString(
>+ Util.LIFECYCLE_ID_ALREADY_ADDED_ID,params));
> }
> throw new IllegalArgumentException(message);
> }
> lifecycleMap.put(lifecycleId, new LifecycleWrapper(lifecycle, false));
>- if (log.isDebugEnabled()) {
>- log.debug("addedLifecycle: " + lifecycleId + " " + lifecycle);
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("addedLifecycle: " + lifecycleId + " " + lifecycle);
> }
> }
>
>@@ -190,8 +191,8 @@
> Util.getExceptionMessageString(
> Util.CANT_CREATE_LIFECYCLE_ERROR_MESSAGE_ID,
> params);
>- if (log.isErrorEnabled()) {
>- log.error("LifecycleId " + lifecycleId + " does not exist");
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.warning("LifecycleId " + lifecycleId + " does not exist");
> }
> throw new IllegalArgumentException(message);
> }
>@@ -200,8 +201,8 @@
> result = wrapper.instance;
> wrapper.created = true;
>
>- if (log.isTraceEnabled()) {
>- log.trace("getLifecycle: " + lifecycleId + " " + result);
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("getLifecycle: " + lifecycleId + " " + result);
> }
> return result;
> }
>Index: src/com/sun/faces/lifecycle/LifecycleImpl.java
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/LifecycleImpl.java,v
>retrieving revision 1.49
>diff -u -r1.49 LifecycleImpl.java
>--- src/com/sun/faces/lifecycle/LifecycleImpl.java 15 Jun 2005 20:42:26 -0000 1.49
>+++ src/com/sun/faces/lifecycle/LifecycleImpl.java 23 Jun 2005 18:36:25 -0000
>@@ -10,8 +10,8 @@
> package com.sun.faces.lifecycle;
>
> import com.sun.faces.util.Util;
>-import org.apache.commons.logging.Log;
>-import org.apache.commons.logging.LogFactory;
>+import java.util.logging.Logger;
>+import java.util.logging.Level;
>
> import javax.faces.FacesException;
> import javax.faces.context.FacesContext;
>@@ -51,7 +51,8 @@
>
>
> // Log instance for this class
>- private static final Log log = LogFactory.getLog(LifecycleImpl.class);
>+ private static Logger logger = Util.getLogger(Util.FACES_LOGGER
>+ + Util.LIFECYCLE_LOGGER);
>
>
> // ------------------------------------------------------ Instance Variables
>@@ -93,8 +94,8 @@
> (Util.NULL_PARAMETERS_ERROR_MESSAGE_ID));
> }
>
>- if (log.isDebugEnabled()) {
>- log.debug("execute(" + context + ")");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("execute(" + context + ")");
> }
>
> // populate the FacesCompositeELResolver stack if a request is being
>@@ -111,8 +112,8 @@
> phase((PhaseId) PhaseId.VALUES.get(i), phases[i], context);
>
> if (reload((PhaseId) PhaseId.VALUES.get(i), context)) {
>- if (log.isDebugEnabled()) {
>- log.debug("Skipping rest of execute() because of a reload");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Skipping rest of execute() because of a reload");
> }
> context.renderResponse();
> }
>@@ -130,8 +131,8 @@
> (Util.NULL_PARAMETERS_ERROR_MESSAGE_ID));
> }
>
>- if (log.isDebugEnabled()) {
>- log.debug("render(" + context + ")");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("render(" + context + ")");
> }
>
> if (!context.getResponseComplete()) {
>@@ -149,8 +150,8 @@
> (Util.getExceptionMessageString
> (Util.NULL_PARAMETERS_ERROR_MESSAGE_ID));
> }
>- if (log.isDebugEnabled()) {
>- log.debug("addPhaseListener(" + listener.getPhaseId().toString()
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("addPhaseListener(" + listener.getPhaseId().toString()
> + "," + listener);
> }
> synchronized (listeners) {
>@@ -179,8 +180,8 @@
> (Util.getExceptionMessageString
> (Util.NULL_PARAMETERS_ERROR_MESSAGE_ID));
> }
>- if (log.isDebugEnabled()) {
>- log.debug("removePhaseListener(" +
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("removePhaseListener(" +
> listener.getPhaseId().toString()
> + "," + listener);
> }
>@@ -198,8 +199,8 @@
> private void phase(PhaseId phaseId, Phase phase, FacesContext context)
> throws FacesException {
>
>- if (log.isTraceEnabled()) {
>- log.trace("phase(" + phaseId.toString() + "," + context + ")");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("phase(" + phaseId.toString() + "," + context + ")");
> }
>
> int
>@@ -229,8 +230,8 @@
> }
> }
> catch (Throwable e) {
>- if (log.isTraceEnabled()) {
>- log.trace("phase(" + phaseId.toString() + "," + context +
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.warning("phase(" + phaseId.toString() + "," + context +
> ") threw exception: " + e + " " + e.getMessage() +
> "\n" + Util.getStackTraceString(e));
> }
>@@ -259,8 +260,8 @@
> }
> }
> catch (Throwable e) {
>- if (log.isTraceEnabled()) {
>- log.trace("phase(" + phaseId.toString() + "," + context +
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.warning("phase(" + phaseId.toString() + "," + context +
> ") threw exception: " + e + " " + e.getMessage() +
> "\n" + Util.getStackTraceString(e));
> }
>@@ -334,6 +335,12 @@
> if (requestServiced == null) {
> CompositeELResolver compositeELResolverForJsp =
> appAssociate.getFacesELResolverForJsp();
>+ if (compositeELResolverForJsp == null) {
>+ if (logger.isLoggable(Level.INFO)) {
>+ logger.info("FacesELResolvers not registered with Jsp.");
>+ }
>+ return;
>+ }
> compositeELResolverForJsp.add(new ImplicitObjectELResolverForJsp());
> compositeELResolverForJsp.add(new ManagedBeanELResolver());
>
>Index: src/com/sun/faces/lifecycle/ProcessValidationsPhase.java
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/ProcessValidationsPhase.java,v
>retrieving revision 1.23
>diff -u -r1.23 ProcessValidationsPhase.java
>--- src/com/sun/faces/lifecycle/ProcessValidationsPhase.java 16 May 2005 20:16:21 -0000 1.23
>+++ src/com/sun/faces/lifecycle/ProcessValidationsPhase.java 23 Jun 2005 18:36:25 -0000
>@@ -14,8 +14,10 @@
> import javax.faces.context.FacesContext;
> import javax.faces.event.PhaseId;
>
>-import org.apache.commons.logging.Log;
>-import org.apache.commons.logging.LogFactory;
>+import java.util.logging.Logger;
>+import java.util.logging.Level;
>+
>+import com.sun.faces.util.Util;
>
> /**
> * ProcessValidationsPhase executes <code>processValidators</code> on each
>@@ -28,8 +30,8 @@
> //
>
> // Log instance for this class
>- private static final Log log =
>- LogFactory.getLog(ProcessValidationsPhase.class);
>+ private static Logger logger = Util.getLogger(Util.FACES_LOGGER
>+ + Util.LIFECYCLE_LOGGER);
>
> //
> // Class Variables
>@@ -68,8 +70,8 @@
>
>
> public void execute(FacesContext facesContext) throws FacesException {
>- if (log.isDebugEnabled()) {
>- log.debug("Entering ProcessValidationsPhase");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Entering ProcessValidationsPhase");
> }
> UIComponent component = facesContext.getViewRoot();
> assert (null != component);
>@@ -79,14 +81,14 @@
> } catch (RuntimeException re) {
> String exceptionMessage = re.getMessage();
> if (null != exceptionMessage) {
>- if (log.isErrorEnabled()) {
>- log.error(exceptionMessage, re);
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.log(Level.WARNING, exceptionMessage, re);
> }
> }
> throw new FacesException(exceptionMessage, re);
> }
>- if (log.isDebugEnabled()) {
>- log.debug("Exiting ProcessValidationsPhase");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Exiting ProcessValidationsPhase");
> }
> }
>
>Index: src/com/sun/faces/lifecycle/RenderResponsePhase.java
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/RenderResponsePhase.java,v
>retrieving revision 1.15
>diff -u -r1.15 RenderResponsePhase.java
>--- src/com/sun/faces/lifecycle/RenderResponsePhase.java 16 May 2005 20:16:21 -0000 1.15
>+++ src/com/sun/faces/lifecycle/RenderResponsePhase.java 23 Jun 2005 18:36:25 -0000
>@@ -18,8 +18,9 @@
> import javax.faces.context.FacesContext;
> import javax.faces.event.PhaseId;
>
>-import org.apache.commons.logging.Log;
>-import org.apache.commons.logging.LogFactory;
>+import java.util.logging.Logger;
>+import java.util.logging.Level;
>+import com.sun.faces.util.Util;
>
>
> /**
>@@ -35,7 +36,8 @@
> // Protected Constants
> //
> // Log instance for this class
>- private static final Log log = LogFactory.getLog(RenderResponsePhase.class);
>+ private static Logger logger = Util.getLogger(Util.FACES_LOGGER
>+ + Util.LIFECYCLE_LOGGER);
>
> //
> // Class Variables
>@@ -75,13 +77,12 @@
>
>
> public void execute(FacesContext facesContext) throws FacesException {
>- if (log.isDebugEnabled()) {
>- log.debug("Entering RenderResponsePhase");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Entering RenderResponsePhase");
> }
>- if (log.isDebugEnabled()) {
>- log.debug(
>- "About to render view " +
>- facesContext.getViewRoot().getViewId());
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("About to render view " +
>+ facesContext.getViewRoot().getViewId());
> }
> try {
> facesContext.getApplication().getViewHandler().
>@@ -89,8 +90,8 @@
> } catch (IOException e) {
> throw new FacesException(e.getMessage(), e);
> }
>- if (log.isDebugEnabled()) {
>- log.debug("Exiting RenderResponsePhase");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Exiting RenderResponsePhase");
> }
> }
>
>Index: src/com/sun/faces/lifecycle/RestoreViewPhase.java
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/RestoreViewPhase.java,v
>retrieving revision 1.23
>diff -u -r1.23 RestoreViewPhase.java
>--- src/com/sun/faces/lifecycle/RestoreViewPhase.java 16 May 2005 20:16:22 -0000 1.23
>+++ src/com/sun/faces/lifecycle/RestoreViewPhase.java 23 Jun 2005 18:36:25 -0000
>@@ -26,9 +26,8 @@
>
> import com.sun.faces.util.Util;
>
>-import org.apache.commons.logging.Log;
>-import org.apache.commons.logging.LogFactory;
>-
>+import java.util.logging.Logger;
>+import java.util.logging.Level;
>
> /**
> * <B>Lifetime And Scope</B> <P> Same lifetime and scope as
>@@ -42,8 +41,8 @@
> //
> // Protected Constants
> //
>- // Log instance for this class
>- private static final Log log = LogFactory.getLog(RestoreViewPhase.class);
>+ private static Logger logger = Util.getLogger(Util.FACES_LOGGER
>+ + Util.LIFECYCLE_LOGGER);
>
> //
> // Class Variables
>@@ -87,8 +86,8 @@
> */
>
> public void execute(FacesContext facesContext) throws FacesException {
>- if (log.isDebugEnabled()) {
>- log.debug("Entering RestoreViewPhase");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Entering RestoreViewPhase");
> }
> if (null == facesContext) {
> throw new FacesException(Util.getExceptionMessageString(
>@@ -100,8 +99,8 @@
> UIViewRoot viewRoot = facesContext.getViewRoot();
> Locale locale = null;
> if (viewRoot != null) {
>- if (log.isDebugEnabled()) {
>- log.debug("Found a pre created view in FacesContext");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Found a pre created view in FacesContext");
> }
> locale = facesContext.getExternalContext().getRequestLocale();
> facesContext.getViewRoot().setLocale(locale);
>@@ -133,8 +132,8 @@
> }
>
> if (viewId == null) {
>- if (log.isDebugEnabled()) {
>- log.debug("viewId is null");
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.warning("viewId is null");
> }
> throw new FacesException(Util.getExceptionMessageString(
> Util.NULL_REQUEST_VIEW_ERROR_MESSAGE_ID));
>@@ -147,13 +146,13 @@
> throw new FacesException(Util.getExceptionMessageString(
> Util.NULL_REQUEST_VIEW_ERROR_MESSAGE_ID));
> }
>- if (log.isDebugEnabled()) {
>- log.debug("Postback: Restored view for " + viewId);
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Postback: Restored view for " + viewId);
> }
> }
> else {
>- if (log.isDebugEnabled()) {
>- log.debug("New request: creating a view for " + viewId);
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("New request: creating a view for " + viewId);
> }
> // if that fails, create one
> viewRoot = (Util.getViewHandler(facesContext)).
>@@ -165,8 +164,8 @@
> facesContext.setViewRoot(viewRoot);
> doPerComponentActions(facesContext, viewRoot);
>
>- if (log.isDebugEnabled()) {
>- log.debug("Exiting RestoreViewPhase");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Exiting RestoreViewPhase");
> }
> }
>
>Index: src/com/sun/faces/lifecycle/UpdateModelValuesPhase.java
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/lifecycle/UpdateModelValuesPhase.java,v
>retrieving revision 1.38
>diff -u -r1.38 UpdateModelValuesPhase.java
>--- src/com/sun/faces/lifecycle/UpdateModelValuesPhase.java 16 May 2005 20:16:22 -0000 1.38
>+++ src/com/sun/faces/lifecycle/UpdateModelValuesPhase.java 23 Jun 2005 18:36:26 -0000
>@@ -11,8 +11,8 @@
>
> import com.sun.faces.util.MessageFactory;
> import com.sun.faces.util.Util;
>-import org.apache.commons.logging.Log;
>-import org.apache.commons.logging.LogFactory;
>+import java.util.logging.Logger;
>+import java.util.logging.Level;
>
> import javax.faces.FacesException;
> import javax.faces.component.UIComponent;
>@@ -26,29 +26,29 @@
> */
> public class UpdateModelValuesPhase extends Phase {
>
>-//
>-// Protected Constants
>-//
>+ //
>+ // Protected Constants
>+ //
>
>-//
>-// Class Variables
>-//
>+ //
>+ // Class Variables
>+ //
>
>-//
>-// Instance Variables
>-//
>-// Log instance for this class
>- private static final Log log =
>- LogFactory.getLog(UpdateModelValuesPhase.class);
>+ //
>+ // Instance Variables
>+ //
>+ // Log instance for this class
>+ private static Logger logger = Util.getLogger(Util.FACES_LOGGER
>+ + Util.LIFECYCLE_LOGGER);
>
>-// Attribute Instance Variables
>+ // Attribute Instance Variables
>
>-// Relationship Instance Variables
>+ // Relationship Instance Variables
>
>
>-//
>-// Constructors and Genericializers
>-//
>+ //
>+ // Constructors and Genericializers
>+ //
>
> public UpdateModelValuesPhase() {
> }
>@@ -71,8 +71,8 @@
>
>
> public void execute(FacesContext facesContext) {
>- if (log.isDebugEnabled()) {
>- log.debug("Entering UpdateModelValuesPhase");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Entering UpdateModelValuesPhase");
> }
> UIComponent component = facesContext.getViewRoot();
> assert (null != component);
>@@ -90,14 +90,13 @@
> Object[] params = new Object[3];
> params[2] = exceptionMessage;
> facesContext.addMessage(component.getClientId(facesContext),
>- MessageFactory.getMessage(facesContext,
>- Util.MODEL_UPDATE_ERROR_MESSAGE_ID,
>- params));
>- if (log.isErrorEnabled()) {
>- log.error(exceptionMessage);
>+ MessageFactory.getMessage(facesContext,
>+ Util.MODEL_UPDATE_ERROR_MESSAGE_ID, params));
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.warning(exceptionMessage);
> }
>- if (log.isDebugEnabled()) {
>- log.debug("Exiting UpdateModelValuesPhase");
>+ if (logger.isLoggable(Level.FINE)) {
>+ logger.fine("Exiting UpdateModelValuesPhase");
> }
> }
> }
>Index: src/com/sun/faces/util/Util.java
>===================================================================
>RCS file: /cvs/javaserverfaces-sources/jsf-ri/src/com/sun/faces/util/Util.java,v
>retrieving revision 1.163
>diff -u -r1.163 Util.java
>--- src/com/sun/faces/util/Util.java 9 Jun 2005 22:37:50 -0000 1.163
>+++ src/com/sun/faces/util/Util.java 23 Jun 2005 18:36:26 -0000
>@@ -71,7 +71,7 @@
> //
> // Private/Protected Constants
> //
>- public static final String FACES_LOGGER = "javax.enterprise.resource.jsf.";
>+ public static final String FACES_LOGGER = "javax.enterprise.resource.jsf";
>
> public static final String FACES_LOG_STRINGS =
> "com.sun.faces.LogStrings";
>@@ -84,9 +84,12 @@
> // parameters to test/com/sun/faces/util/TestUtil_messages (see comment there).
>
> // Loggers
>- public static final String RENDERKIT_LOGGER = "renderkit";
>- public static final String TAGLIB_LOGGER = "taglib";
>- public static final String APPLICATION_LOGGER = "application";
>+ public static final String RENDERKIT_LOGGER = ".renderkit";
>+ public static final String TAGLIB_LOGGER = ".taglib";
>+ public static final String APPLICATION_LOGGER = ".application";
>+ public static final String CONTEXT_LOGGER = ".context";
>+ public static final String CONFIG_LOGGER = ".config";
>+ public static final String LIFECYCLE_LOGGER = ".lifecycle";
>
> /**
> * The message identifier of the {_at_link FacesMessage} to be created as
>@@ -1210,11 +1213,12 @@
>
> RenderKit renderKit = renderKitFactory.getRenderKit(context, renderKitId);
> if ( renderKit == null) {
>- if ( logger.isLoggable(Level.SEVERE)) {
>- logger.log(Level.SEVERE,
>- "Renderkit could not loaded for renderKitId "
>+ if (logger.isLoggable(Level.WARNING)) {
>+ logger.warning("Renderkit could not loaded for renderKitId "
> + renderKitId);
> }
>+ throw new FacesException("Renderkit could not loaded for renderKitId "
>+ + renderKitId);
> }
> assert (null != renderKit);
>
>
>
>
>------------------------------------------------------------------------
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: dev-unsubscribe_at_javaserverfaces.dev.java.net
>For additional commands, e-mail: dev-help_at_javaserverfaces.dev.java.net
>
>