You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2009/10/13 19:42:40 UTC

svn commit: r824859 [2/4] - in /myfaces: core/trunk/api/ core/trunk/api/src/main/java/javax/faces/component/ core/trunk/api/src/main/java/javax/faces/validator/ core/trunk/api/src/main/java/javax/faces/webapp/ core/trunk/impl/ core/trunk/impl/src/main/...

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/FacesConfigurator.java Tue Oct 13 17:42:36 2009
@@ -18,8 +18,59 @@
  */
 package org.apache.myfaces.config;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.io.BufferedReader;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.InputStreamReader;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.net.JarURLConnection;
+import java.net.URL;
+import java.net.URLConnection;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Locale;
+import java.util.Map;
+import java.util.Set;
+import java.util.StringTokenizer;
+import java.util.TreeMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import javax.el.ELResolver;
+import javax.faces.FacesException;
+import javax.faces.FactoryFinder;
+import javax.faces.application.Application;
+import javax.faces.application.ApplicationFactory;
+import javax.faces.application.NavigationHandler;
+import javax.faces.application.ResourceHandler;
+import javax.faces.application.StateManager;
+import javax.faces.application.ViewHandler;
+import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.el.PropertyResolver;
+import javax.faces.el.VariableResolver;
+import javax.faces.event.ActionListener;
+import javax.faces.event.PhaseListener;
+import javax.faces.event.PostConstructApplicationEvent;
+import javax.faces.event.SystemEvent;
+import javax.faces.lifecycle.Lifecycle;
+import javax.faces.lifecycle.LifecycleFactory;
+import javax.faces.render.RenderKit;
+import javax.faces.render.RenderKitFactory;
+import javax.faces.webapp.FacesServlet;
+
 import org.apache.myfaces.application.ApplicationFactoryImpl;
 import org.apache.myfaces.application.ApplicationImpl;
 import org.apache.myfaces.component.visit.VisitContextFactoryImpl;
@@ -31,7 +82,10 @@
 import org.apache.myfaces.config.element.Renderer;
 import org.apache.myfaces.config.impl.digester.DigesterFacesConfigDispenserImpl;
 import org.apache.myfaces.config.impl.digester.DigesterFacesConfigUnmarshallerImpl;
-import org.apache.myfaces.config.impl.digester.elements.*;
+import org.apache.myfaces.config.impl.digester.elements.ConfigOthersSlot;
+import org.apache.myfaces.config.impl.digester.elements.FacesConfig;
+import org.apache.myfaces.config.impl.digester.elements.FacesConfigNameSlot;
+import org.apache.myfaces.config.impl.digester.elements.OrderSlot;
 import org.apache.myfaces.config.impl.digester.elements.ResourceBundle;
 import org.apache.myfaces.config.impl.digester.elements.SystemEventListener;
 import org.apache.myfaces.context.ExceptionHandlerFactoryImpl;
@@ -54,32 +108,6 @@
 import org.apache.myfaces.view.facelets.util.Classpath;
 import org.xml.sax.SAXException;
 
-import javax.el.ELResolver;
-import javax.faces.FacesException;
-import javax.faces.FactoryFinder;
-import javax.faces.application.Application;
-import javax.faces.application.*;
-import javax.faces.context.ExternalContext;
-import javax.faces.context.FacesContext;
-import javax.faces.el.PropertyResolver;
-import javax.faces.el.VariableResolver;
-import javax.faces.event.*;
-import javax.faces.lifecycle.Lifecycle;
-import javax.faces.lifecycle.LifecycleFactory;
-import javax.faces.render.RenderKit;
-import javax.faces.render.RenderKitFactory;
-import javax.faces.webapp.FacesServlet;
-import java.io.*;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.net.JarURLConnection;
-import java.net.URL;
-import java.net.URLConnection;
-import java.util.*;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
 /**
  * Configures everything for a given context. The FacesConfigurator is independent of the concrete implementations that
  * lie behind FacesConfigUnmarshaller and FacesConfigDispenser.
@@ -90,7 +118,8 @@
 @SuppressWarnings("deprecation")
 public class FacesConfigurator
 {
-    private static final Log log = LogFactory.getLog(FacesConfigurator.class);
+    //private static final Log log = LogFactory.getLog(FacesConfigurator.class);
+    private static final Logger log = Logger.getLogger(FacesConfigurator.class.getName());
 
     private static final String STANDARD_FACES_CONFIG_RESOURCE = "META-INF/standard-faces-config.xml";
     private static final String FACES_CONFIG_RESOURCE = "META-INF/faces-config.xml";
@@ -241,7 +270,7 @@
         }
         catch (IOException e)
         {
-            log.error("Could not read resource " + resource, e);
+            log.log(Level.SEVERE, "Could not read resource " + resource, e);
         }
         return 0;
     }
@@ -342,7 +371,7 @@
                 }
                 catch (NoSuchMethodException e)
                 {
-                    log.error("Configuration objects do not support clean-up. Update aborted");
+                    log.severe("Configuration objects do not support clean-up. Update aborted");
 
                     // We still want to update the timestamp to avoid running purge on every subsequent
                     // request after this one.
@@ -353,11 +382,11 @@
                 }
                 catch (IllegalAccessException e)
                 {
-                    log.fatal("Error during configuration clean-up" + e.getMessage());
+                    log.severe("Error during configuration clean-up" + e.getMessage());
                 }
                 catch (InvocationTargetException e)
                 {
-                    log.fatal("Error during configuration clean-up" + e.getMessage());
+                    log.severe("Error during configuration clean-up" + e.getMessage());
                 }
                 configure();
                 
@@ -433,7 +462,7 @@
             //5. Ordering of Artifacts (see section 11.4.7 of the spec)
             orderAndFeedArtifacts(appConfigResources,webAppFacesConfig); 
 
-            if (log.isInfoEnabled())
+            if (log.isLoggable(Level.INFO))
             {
                 logMetaInf();
             }
@@ -471,7 +500,7 @@
         InputStream stream = ClassUtils.getResourceAsStream(STANDARD_FACES_CONFIG_RESOURCE);
         if (stream == null)
             throw new FacesException("Standard faces config " + STANDARD_FACES_CONFIG_RESOURCE + " not found");
-        if (log.isInfoEnabled())
+        if (log.isLoggable(Level.INFO))
             log.info("Reading standard config " + STANDARD_FACES_CONFIG_RESOURCE);
         getDispenser().feed(getUnmarshaller().getFacesConfig(stream, STANDARD_FACES_CONFIG_RESOURCE));
         stream.close();
@@ -517,13 +546,13 @@
                 }
             }
 
-            if (log.isInfoEnabled())
+            if (log.isLoggable(Level.INFO))
             {
                 String[] artifactIds = { MYFACES_API_PACKAGE_NAME, MYFACES_IMPL_PACKAGE_NAME,
                         MYFACES_TOMAHAWK_PACKAGE_NAME, MYFACES_TOMAHAWK_SANDBOX_PACKAGE_NAME,
                         MYFACES_TOMAHAWK_SANDBOX15_PACKAGE_NAME, COMMONS_EL_PACKAGE_NAME, JSP_API_PACKAGE_NAME };
 
-                if (log.isWarnEnabled())
+                if (log.isLoggable(Level.WARNING))
                 {
                     for (String artifactId : artifactIds)
                     {
@@ -555,7 +584,7 @@
                                 needComma = true;
                             }
 
-                            log.warn(builder);
+                            log.warning(builder.toString());
                         }
                     }
                 }
@@ -614,7 +643,7 @@
                     }
 
 
-                    if (log.isInfoEnabled())
+                    if (log.isLoggable(Level.INFO))
                     {
                         log.info("Found " + factoryName + " factory implementation: " + className);
                     }
@@ -691,7 +720,7 @@
                 try
                 {
                     stream = openStreamWithoutCache(entry.getValue());
-                    if (log.isInfoEnabled())
+                    if (log.isLoggable(Level.INFO))
                     {
                         log.info("Reading config : " + entry.getKey());
                     }
@@ -720,11 +749,11 @@
             InputStream stream = _externalContext.getResourceAsStream(systemId);
             if (stream == null)
             {
-                log.error("Faces config resource " + systemId + " not found");
+                log.severe("Faces config resource " + systemId + " not found");
                 continue;
             }
 
-            if (log.isInfoEnabled())
+            if (log.isLoggable(Level.INFO))
             {
                 log.info("Reading config " + systemId);
             }
@@ -746,9 +775,9 @@
 
                 if (DEFAULT_FACES_CONFIG.equals(systemId))
                 {
-                    if (log.isWarnEnabled())
+                    if (log.isLoggable(Level.WARNING))
                     {
-                        log.warn(DEFAULT_FACES_CONFIG + " has been specified in the " + FacesServlet.CONFIG_FILES_ATTR
+                        log.warning(DEFAULT_FACES_CONFIG + " has been specified in the " + FacesServlet.CONFIG_FILES_ATTR
                                 + " context parameter of "
                                 + "the deployment descriptor. This will automatically be removed, "
                                 + "if we wouldn't do this, it would be loaded twice.  See JSF spec 1.1, 10.3.2");
@@ -770,7 +799,7 @@
         InputStream stream = _externalContext.getResourceAsStream(DEFAULT_FACES_CONFIG);
         if (stream != null)
         {
-            if (log.isInfoEnabled())
+            if (log.isLoggable(Level.INFO))
                 log.info("Reading config /WEB-INF/faces-config.xml");
             webAppConfig = getUnmarshaller().getFacesConfig(stream, DEFAULT_FACES_CONFIG);
             //getDispenser().feed(getUnmarshaller().getFacesConfig(stream, DEFAULT_FACES_CONFIG));
@@ -786,9 +815,9 @@
         {
             if (webAppConfig.getOrdering() != null)
             {
-                if (log.isWarnEnabled())
+                if (log.isLoggable(Level.WARNING))
                 {
-                    log.warn("<ordering> element found in application faces config. " +
+                    log.warning("<ordering> element found in application faces config. " +
                             "This description will be ignored and the actions described " +
                             "in <absolute-ordering> element will be taken into account instead.");
                 }                
@@ -834,9 +863,9 @@
             {
                 if (resource.getOrdering() != null)
                 {
-                    if (log.isWarnEnabled())
+                    if (log.isLoggable(Level.WARNING))
                     {
-                        log.warn("<absolute-ordering> element found in application " +
+                        log.warning("<absolute-ordering> element found in application " +
                                 "configuration resource "+resource.getName()+". " +
                                 "This description will be ignored and the actions described " +
                                 "in <ordering> elements will be taken into account instead.");
@@ -1006,7 +1035,7 @@
                             }
                             if (founded)
                             {
-                                log.fatal("Circular references detected when sorting " +
+                                log.severe("Circular references detected when sorting " +
                                           "application config resources. Use absolute ordering instead.");
                                 throw new FacesException("Circular references detected when sorting " +
                                         "application config resources. Use absolute ordering instead.");
@@ -1032,7 +1061,7 @@
                             }
                             if (founded)
                             {
-                                log.fatal("Circular references detected when sorting " +
+                                log.severe("Circular references detected when sorting " +
                                     "application config resources. Use absolute ordering instead.");
                                 throw new FacesException("Circular references detected when sorting " +
                                     "application config resources. Use absolute ordering instead.");
@@ -1609,7 +1638,7 @@
                         (Class<?>)ClassUtils.classForName((systemEventListener.getSourceClass() != null) ? systemEventListener.getSourceClass(): getDefaultSourcClassForSystemEvent(eventClass) ), //Application.class???
                         (javax.faces.event.SystemEventListener)ClassUtils.newInstance(systemEventListener.getSystemEventListenerClass()));
             } catch (ClassNotFoundException e) {
-                log.error("System event listener could not be initialized, reason:",e);
+                log.log(Level.SEVERE, "System event listener could not be initialized, reason:",e);
             }
         }
 
@@ -1633,7 +1662,7 @@
             }
             catch (Exception ex)
             {
-                log.error("Converter could not be added. Reason:", ex);
+                log.log(Level.SEVERE, "Converter could not be added. Reason:", ex);
             }
         }
 
@@ -1692,7 +1721,7 @@
             }
             return parms[0].getName();
         }
-        log.warn("The SystemEvent source type for "+systemEventClass.getName() + " could not be detected, either register it manually or use a constructor argument for auto detection, defaulting now to java.lang.Object");
+        log.warning("The SystemEvent source type for "+systemEventClass.getName() + " could not be detected, either register it manually or use a constructor argument for auto detection, defaulting now to java.lang.Object");
         return "java.lang.Object";
     };
 
@@ -1745,17 +1774,17 @@
                     }
                     catch (InstantiationException e)
                     {
-                        log.error(e.getMessage(), e);
+                        log.log(Level.SEVERE, e.getMessage(), e);
                         throw new FacesException(e);
                     }
                     catch (IllegalAccessException e)
                     {
-                        log.error(e.getMessage(), e);
+                        log.log(Level.SEVERE, e.getMessage(), e);
                         throw new FacesException(e);
                     }
                     catch (InvocationTargetException e)
                     {
-                        log.error(e.getMessage(), e);
+                        log.log(Level.SEVERE, e.getMessage(), e);
                         throw new FacesException(e);
                     }
                 }
@@ -1777,9 +1806,9 @@
         FacesConfigDispenser<FacesConfig> dispenser = getDispenser();
         for (ManagedBean bean : dispenser.getManagedBeans())
         {
-            if (log.isWarnEnabled() && runtimeConfig.getManagedBean(bean.getManagedBeanName()) != null)
+            if (log.isLoggable(Level.WARNING) && runtimeConfig.getManagedBean(bean.getManagedBeanName()) != null)
             {
-                log.warn("More than one managed bean w/ the name of '" + bean.getManagedBeanName()
+                log.warning("More than one managed bean w/ the name of '" + bean.getManagedBeanName()
                         + "' - only keeping the last ");
             }
 
@@ -1860,7 +1889,7 @@
                 catch (Throwable e)
                 {
                     // ignore the failure so that the render kit is configured
-                    log.error("failed to configure class " + element.getRendererClass(), e);
+                    log.log(Level.SEVERE, "failed to configure class " + element.getRendererClass(), e);
                     continue;
                 }
 
@@ -1879,8 +1908,8 @@
                     catch (Throwable e) {
                         // Ignore.
                         
-                        if (log.isErrorEnabled()) {
-                            log.error ("failed to configure client behavior renderer class " +
+                        if (log.isLoggable(Level.SEVERE)) {
+                            log.log(Level.SEVERE, "failed to configure client behavior renderer class " +
                                  clientBehaviorRenderer.getRendererClass(), e);
                         }
                     }
@@ -1906,7 +1935,7 @@
             }
             catch (ClassCastException e)
             {
-                log.error("Class " + listenerClassName + " does not implement PhaseListener");
+                log.severe("Class " + listenerClassName + " does not implement PhaseListener");
             }
         }
     }
@@ -2180,18 +2209,18 @@
             }
             catch (ClassCastException e)
             {
-                log.error("Make sure '" + serialProvider + "' implements the correct interface", e);
+                log.log(Level.SEVERE, "Make sure '" + serialProvider + "' implements the correct interface", e);
             }
             catch (Exception e)
             {
-                log.error(e);
+                log.log(Level.SEVERE,"", e);
             }
             finally
             {
                 if (serialFactory == null)
                 {
                     serialFactory = new DefaultSerialFactory();
-                    log.error("Using default serialization provider");
+                    log.severe("Using default serialization provider");
                 }
             }
 

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/ManagedBeanBuilder.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/ManagedBeanBuilder.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/ManagedBeanBuilder.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/ManagedBeanBuilder.java Tue Oct 13 17:42:36 2009
@@ -26,6 +26,8 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.el.ELContext;
 import javax.el.ELException;
@@ -39,8 +41,6 @@
 import javax.naming.NamingException;
 
 import org.apache.commons.beanutils.PropertyUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.config.annotation.LifecycleProvider;
 import org.apache.myfaces.config.annotation.LifecycleProvider2;
 import org.apache.myfaces.config.annotation.LifecycleProviderFactory;
@@ -62,7 +62,8 @@
  */
 public class ManagedBeanBuilder
 {
-    private static Log log = LogFactory.getLog(ManagedBeanBuilder.class);
+    //private static Log log = LogFactory.getLog(ManagedBeanBuilder.class);
+    private static Logger log = Logger.getLogger(ManagedBeanBuilder.class.getName());
     private RuntimeConfig _runtimeConfig;
     public final static String REQUEST = "request";
     public final static String APPLICATION = "application";
@@ -295,7 +296,7 @@
         {
             String message = "Cannot coerce " + value.getClass().getName()
                     + " to " + desiredClass.getName();
-            log.error(message, e);
+            log.log(Level.SEVERE, message , e);
             throw new FacesException(message, e);
         }
     }

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/RuntimeConfig.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/RuntimeConfig.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/RuntimeConfig.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/RuntimeConfig.java Tue Oct 13 17:42:36 2009
@@ -23,6 +23,8 @@
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.el.CompositeELResolver;
 import javax.el.ELResolver;
@@ -31,8 +33,6 @@
 import javax.faces.el.PropertyResolver;
 import javax.faces.el.VariableResolver;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.config.element.ManagedBean;
 import org.apache.myfaces.config.element.NavigationRule;
 import org.apache.myfaces.config.impl.digester.elements.ResourceBundle;
@@ -48,7 +48,8 @@
 @SuppressWarnings("deprecation")
 public class RuntimeConfig
 {
-    private static final Log log = LogFactory.getLog(RuntimeConfig.class);
+    //private static final Log log = LogFactory.getLog(RuntimeConfig.class);
+    private static final Logger log = Logger.getLogger(RuntimeConfig.class.getName());
 
     private static final String APPLICATION_MAP_PARAM_NAME = RuntimeConfig.class.getName();
 
@@ -169,9 +170,9 @@
             throw new IllegalArgumentException("bundle must not be null");
         }
         String var = bundle.getVar();
-        if (_resourceBundles.containsKey(var) && log.isWarnEnabled())
+        if (_resourceBundles.containsKey(var) && log.isLoggable(Level.WARNING))
         {
-            log.warn("Another resource bundle for var '" + var + "' with base name '"
+            log.warning("Another resource bundle for var '" + var + "' with base name '"
                     + _resourceBundles.get(var).getBaseName() + "' is already registered. '"
                     + _resourceBundles.get(var).getBaseName() + "' will be replaced with '" + bundle.getBaseName()
                     + "'.");

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/AnnotationConfigurator.java Tue Oct 13 17:42:36 2009
@@ -35,6 +35,8 @@
 import java.util.Set;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.faces.FacesException;
 import javax.faces.FactoryFinder;
@@ -60,8 +62,6 @@
 import javax.faces.render.Renderer;
 import javax.faces.validator.FacesValidator;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.config.FacesConfigDispenser;
 import org.apache.myfaces.config.NamedEventManager;
 import org.apache.myfaces.config.RuntimeConfig;
@@ -92,8 +92,8 @@
  */
 public class AnnotationConfigurator
 {
-    private static final Log log = LogFactory
-            .getLog(AnnotationConfigurator.class);
+    //private static final Log log = LogFactory.getLog(AnnotationConfigurator.class);
+    private static final Logger log = Logger.getLogger(AnnotationConfigurator.class.getName());
 
     private static final String META_INF_PREFIX = "META-INF/";
 
@@ -236,9 +236,9 @@
         {
             archives = webArchives(_externalContext);
 
-            if (log.isTraceEnabled())
+            if (log.isLoggable(Level.FINEST))
             {
-                log.trace("Receiving " + archives.size() + " jar files to check");
+                log.finest("Receiving " + archives.size() + " jar files to check");
             }
             for (JarFile archive : archives)
             {
@@ -417,10 +417,10 @@
                 }
                 if (signal == null)
                 {
-                    if (log.isTraceEnabled())
+                    if (log.isLoggable(Level.FINEST))
                     {
                         log
-                                .trace("Skip JAR file "
+                                .finest("Skip JAR file "
                                         + path
                                         + " because it has no META-INF/faces-config.xml resource");
                     }
@@ -487,9 +487,9 @@
                 // load it using the classLoader. Anyway, log a debug
                 // message.
                 couldContainAnnotation = true;
-                if (log.isDebugEnabled())
+                if (log.isLoggable(Level.FINE))
                 {
-                    log.debug("IOException when filtering class " + name
+                    log.fine("IOException when filtering class " + name
                             + " for annotations");
                 }
             }
@@ -573,9 +573,9 @@
         {
             return; //need this in case there is no WEB-INF/classes directory
         }
-        if (log.isTraceEnabled())
+        if (log.isLoggable(Level.FINEST))
         {
-            log.trace("webClasses(" + prefix + ") - Received " + paths.size()
+            log.finest("webClasses(" + prefix + ") - Received " + paths.size()
                     + " paths to check");
         }
 
@@ -583,10 +583,10 @@
 
         if (paths.isEmpty())
         {
-            if (log.isWarnEnabled())
+            if (log.isLoggable(Level.WARNING))
             {
                 log
-                        .warn("AnnotationConfigurator does not found classes "
+                        .warning("AnnotationConfigurator does not found classes "
                                 + "for annotations in "
                                 + prefix
                                 + " ."
@@ -624,9 +624,9 @@
                         // load it using the classLoader. Anyway, log a debug
                         // message.
                         couldContainAnnotation = true;
-                        if (log.isDebugEnabled())
+                        if (log.isLoggable(Level.FINE))
                         {
-                            log.debug("IOException when filtering class " + path
+                            log.fine("IOException when filtering class " + path
                                     + " for annotations");
                         }
                     }
@@ -682,18 +682,18 @@
      */
     protected void configureClass( Application application, FacesConfigDispenser<FacesConfig> dispenser, Class clazz)
     {
-        if (log.isTraceEnabled())
+        if (log.isLoggable(Level.FINEST))
         {
-            log.trace("registerClass(" + clazz.getName() + ")");
+            log.finest("registerClass(" + clazz.getName() + ")");
         }
 
         FacesComponent comp = (FacesComponent) clazz
                 .getAnnotation(FacesComponent.class);
         if (comp != null)
         {
-            if (log.isTraceEnabled())
+            if (log.isLoggable(Level.FINEST))
             {
-                log.trace("addComponent(" + comp.value() + ","
+                log.finest("addComponent(" + comp.value() + ","
                         + clazz.getName() + ")");
             }
             
@@ -709,9 +709,9 @@
                 .getAnnotation(FacesConverter.class);
         if (conv != null)
         {
-            if (log.isTraceEnabled())
+            if (log.isLoggable(Level.FINEST))
             {
-                log.trace("addConverter(" + conv.value() + ","
+                log.finest("addConverter(" + conv.value() + ","
                         + clazz.getName() + ")");
             }
             //If there is a previous entry on Application Configuration Resources,
@@ -731,9 +731,9 @@
         .getAnnotation(FacesValidator.class);
         if (val != null)
         {
-            if (log.isTraceEnabled())
+            if (log.isLoggable(Level.FINEST))
             {
-                log.trace("addValidator(" + val.value() + "," + clazz.getName()
+                log.finest("addValidator(" + val.value() + "," + clazz.getName()
                         + ")");
             }
             //If there is a previous entry on Application Configuration Resources,
@@ -757,9 +757,9 @@
             {
                 renderKitId = RenderKitFactory.HTML_BASIC_RENDER_KIT;
             }
-            if (log.isTraceEnabled())
+            if (log.isLoggable(Level.FINEST))
             {
-                log.trace("addRenderer(" + renderKitId + ", "
+                log.finest("addRenderer(" + renderKitId + ", "
                         + rend.componentFamily() + ", " + rend.rendererType()
                         + ", " + clazz.getName() + ")");
             }
@@ -769,9 +769,9 @@
                         renderKitId);
                 if (rk == null)
                 {
-                    if (log.isErrorEnabled())
+                    if (log.isLoggable(Level.SEVERE))
                     {
-                        log.error("RenderKit "+renderKitId+" not found when adding @FacesRenderer annotation");
+                        log.severe("RenderKit "+renderKitId+" not found when adding @FacesRenderer annotation");
                     }
                     throw new FacesException("RenderKit "+renderKitId+" not found when adding @FacesRenderer annotation");
                 }
@@ -789,9 +789,9 @@
         
         if (bean != null)
         {
-            if (log.isDebugEnabled())
+            if (log.isLoggable(Level.FINE))
             {
-                log.debug("Class '" + clazz.getName() + "' has an @ManagedBean annotation");
+                log.fine("Class '" + clazz.getName() + "' has an @ManagedBean annotation");
             }
             RuntimeConfig runtimeConfig = RuntimeConfig.getCurrentInstance(_externalContext);
             org.apache.myfaces.config.impl.digester.elements.ManagedBean mbc =
@@ -851,17 +851,17 @@
             Field[] fields = fields(clazz);
             for (Field field : fields)
             {
-                if (log.isTraceEnabled())
+                if (log.isLoggable(Level.FINEST))
                 {
-                    log.trace("  Scanning field '" + field.getName() + "'");
+                    log.finest("  Scanning field '" + field.getName() + "'");
                 }
                 javax.faces.bean.ManagedProperty property = (javax.faces.bean.ManagedProperty) field
                         .getAnnotation(javax.faces.bean.ManagedProperty.class);
                 if (property != null)
                 {
-                    if (log.isDebugEnabled())
+                    if (log.isLoggable(Level.FINE))
                     {
-                        log.debug("  Field '" + field.getName()
+                        log.fine("  Field '" + field.getName()
                                 + "' has a @ManagedProperty annotation");
                     }
                     org.apache.myfaces.config.impl.digester.elements.ManagedProperty mpc = 
@@ -889,8 +889,8 @@
             if (!ComponentSystemEvent.class.isAssignableFrom (clazz)) {
                 // Just log this.  We'll catch it later in the runtime.
                 
-                if (log.isWarnEnabled()) {
-                    log.warn (clazz.getName() + " is annotated with @javax.faces.event.NamedEvent, but does " +
+                if (log.isLoggable(Level.WARNING)) {
+                    log.warning (clazz.getName() + " is annotated with @javax.faces.event.NamedEvent, but does " +
                         "not extend javax.faces.event.ComponentSystemEvent");
                 }
                 
@@ -913,14 +913,14 @@
             if (!Behavior.class.isAssignableFrom (clazz)) {
                 // Just log this.  We'll catch it later in the runtime.
                 
-                if (log.isWarnEnabled()) {
-                    log.warn (clazz.getName() + " is annotated with @javax.faces.component.behavior.FacesBehavior, " +
+                if (log.isLoggable(Level.WARNING)) {
+                    log.warning (clazz.getName() + " is annotated with @javax.faces.component.behavior.FacesBehavior, " +
                             "but does not implement javax.faces.component.behavior.Behavior");
                 }
             }
             
-            if (log.isTraceEnabled()) {
-                log.trace ("addBehavior(" + facesBehavior.value() + ", " + clazz.getName() + ")");
+            if (log.isLoggable(Level.FINEST)) {
+                log.finest ("addBehavior(" + facesBehavior.value() + ", " + clazz.getName() + ")");
             }
             
             application.addBehavior (facesBehavior.value(), clazz.getName());
@@ -932,8 +932,8 @@
             String renderKitId = facesBehaviorRenderer.renderKitId();
             RenderKit renderKit;
             
-            if (log.isTraceEnabled()) {
-                log.trace ("addClientBehaviorRenderer(" + renderKitId + ", " + facesBehaviorRenderer.rendererType() + ", " +
+            if (log.isLoggable(Level.FINEST)) {
+                log.finest ("addClientBehaviorRenderer(" + renderKitId + ", " + facesBehaviorRenderer.rendererType() + ", " +
                      clazz.getName() + ")");
             }
             

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultLifecycleProviderFactory.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultLifecycleProviderFactory.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultLifecycleProviderFactory.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/DefaultLifecycleProviderFactory.java Tue Oct 13 17:42:36 2009
@@ -18,26 +18,28 @@
  */
 package org.apache.myfaces.config.annotation;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.commons.discovery.resource.ClassLoaders;
-import org.apache.commons.discovery.resource.names.DiscoverServiceNames;
-import org.apache.commons.discovery.ResourceNameIterator;
-import org.apache.myfaces.shared_impl.util.ClassUtils;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.faces.context.ExternalContext;
 import javax.naming.Context;
 import javax.naming.InitialContext;
 import javax.naming.NamingException;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Constructor;
+
+import org.apache.commons.discovery.ResourceNameIterator;
+import org.apache.commons.discovery.resource.ClassLoaders;
+import org.apache.commons.discovery.resource.names.DiscoverServiceNames;
+import org.apache.myfaces.shared_impl.util.ClassUtils;
 
 /*
  * Date: Mar 12, 2007
  * Time: 9:53:40 PM
  */
 public class DefaultLifecycleProviderFactory extends LifecycleProviderFactory {
-    private static Log log = LogFactory.getLog(DefaultLifecycleProviderFactory.class);
+    //private static Log log = LogFactory.getLog(DefaultLifecycleProviderFactory.class);
+    private static Logger log = Logger.getLogger(DefaultLifecycleProviderFactory.class.getName());
     private static LifecycleProvider LIFECYCLE_PROVIDER_INSTANCE;
     public static final String LIFECYCLE_PROVIDER = LifecycleProvider.class.getName();
 
@@ -96,19 +98,19 @@
         }
         catch (ClassNotFoundException e)
         {
-            log.error("", e);
+            log.log(Level.SEVERE, "", e);
         }
         catch (InstantiationException e)
         {
-            log.error("", e);
+            log.log(Level.SEVERE, "", e);
         }
         catch (IllegalAccessException e)
         {
-            log.error("", e);
+            log.log(Level.SEVERE, "", e);
         }
         catch (InvocationTargetException e)
         {
-            log.error("", e);
+            log.log(Level.SEVERE, "", e);
         }
         return false;
     }
@@ -144,15 +146,15 @@
             }
             catch (InstantiationException e)
             {
-                log.error("", e);
+                log.log(Level.SEVERE, "", e);
             }
             catch (IllegalAccessException e)
             {
-                log.error("", e);
+                log.log(Level.SEVERE, "", e);
             }
             catch (InvocationTargetException e)
             {
-                log.error("", e);
+                log.log(Level.SEVERE, "", e);
             }
         }
         return false;
@@ -209,7 +211,7 @@
         {
             // no initial context available no injection
             LIFECYCLE_PROVIDER_INSTANCE = new NoInjectionAnnotationLifecycleProvider();
-            log.error("No InitialContext found. Using NoInjectionAnnotationProcessor.", e);
+            log.log(Level.SEVERE, "No InitialContext found. Using NoInjectionAnnotationProcessor.", e);
 
         }
     }

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/TomcatAnnotationLifecycleProvider.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/TomcatAnnotationLifecycleProvider.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/TomcatAnnotationLifecycleProvider.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/TomcatAnnotationLifecycleProvider.java Tue Oct 13 17:42:36 2009
@@ -18,19 +18,20 @@
  */
 package org.apache.myfaces.config.annotation;
 
-import org.apache.myfaces.shared_impl.util.ClassUtils;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.lang.reflect.InvocationTargetException;
+import java.util.logging.Logger;
 
-import javax.naming.NamingException;
 import javax.faces.context.ExternalContext;
+import javax.naming.NamingException;
 import javax.servlet.ServletContext;
-import java.lang.reflect.InvocationTargetException;
+
+import org.apache.myfaces.shared_impl.util.ClassUtils;
 
 public class TomcatAnnotationLifecycleProvider implements 
     DiscoverableLifecycleProvider, LifecycleProvider2
 {
-    private static Log log = LogFactory.getLog(TomcatAnnotationLifecycleProvider.class);
+    //private static Log log = LogFactory.getLog(TomcatAnnotationLifecycleProvider.class);
+    private static Logger log = Logger.getLogger(TomcatAnnotationLifecycleProvider.class.getName());
 
     private ExternalContext externalContext;
     private org.apache.AnnotationProcessor annotationProcessor;

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/_PackageInfo.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/_PackageInfo.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/_PackageInfo.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/annotation/_PackageInfo.java Tue Oct 13 17:42:36 2009
@@ -18,10 +18,6 @@
  */
 package org.apache.myfaces.config.annotation;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.shared_impl.util.ClassUtils;
-
 import java.io.File;
 import java.io.FileFilter;
 import java.io.IOException;
@@ -33,6 +29,10 @@
 import java.util.List;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
+import org.apache.myfaces.shared_impl.util.ClassUtils;
 
 /**
  * Copied from org.apache.shale.tiger.view.faces.PackageInfo
@@ -50,7 +50,7 @@
     /**
      * <p>The <code>Log</code> instance we will be using.</p>
      */
-    private transient Log log = null;
+    private transient Logger log = null;
 
     /**
      * the singleton for this class
@@ -175,7 +175,7 @@
                 }
                 catch (URISyntaxException e)
                 {
-                    log().warn("error loading directory " + connection, e);
+                    log().log(Level.WARNING, "error loading directory " + connection, e);
                     continue;
                 }
 
@@ -225,11 +225,11 @@
         }
         catch (NoClassDefFoundError e)
         {
-            log().warn("error loading class " + className, e);
+            log().log(Level.WARNING, "error loading class " + className, e);
         }
         catch (ClassNotFoundException e)
         {
-            log().warn("error loading class " + className, e);
+            log().log(Level.WARNING, "error loading class " + className, e);
         }
 
     }
@@ -278,12 +278,12 @@
      * <p>Return the <code>Log</code> instance to be used for this class,
      * instantiating a new one if necessary.</p>
      */
-    private Log log()
+    private Logger log()
     {
 
         if (log == null)
         {
-            log = LogFactory.getLog(_PackageInfo.class);
+            log = Logger.getLogger(_PackageInfo.class.getName());
         }
         return log;
 

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/FacesConfigEntityResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/FacesConfigEntityResolver.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/FacesConfigEntityResolver.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/config/impl/FacesConfigEntityResolver.java Tue Oct 13 17:42:36 2009
@@ -18,19 +18,18 @@
  */
 package org.apache.myfaces.config.impl;
 
-import org.apache.myfaces.shared_impl.util.ClassUtils;
-import org.xml.sax.EntityResolver;
-import org.xml.sax.InputSource;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import javax.faces.context.ExternalContext;
 import java.io.IOException;
 import java.io.InputStream;
 import java.net.JarURLConnection;
 import java.net.URL;
 import java.util.jar.JarEntry;
+import java.util.logging.Logger;
+
+import javax.faces.context.ExternalContext;
+
+import org.apache.myfaces.shared_impl.util.ClassUtils;
+import org.xml.sax.EntityResolver;
+import org.xml.sax.InputSource;
 
 /**
  * DOCUMENT ME!
@@ -41,7 +40,8 @@
 public class FacesConfigEntityResolver
     implements EntityResolver
 {
-    private static final Log log = LogFactory.getLog(FacesConfigEntityResolver.class);
+    //private static final Log log = LogFactory.getLog(FacesConfigEntityResolver.class);
+    private static final Logger log = Logger.getLogger(FacesConfigEntityResolver.class.getName());
 
     private static final String FACES_CONFIG_1_0_DTD_SYSTEM_ID = "http://java.sun.com/dtd/web-facesconfig_1_0.dtd";
     private static final String FACES_CONFIG_1_0_DTD_RESOURCE
@@ -85,7 +85,7 @@
             JarEntry jarEntry = conn.getJarEntry();
             if (jarEntry == null)
             {
-                log.fatal("JAR entry '" + systemId + "' not found.");
+                log.severe("JAR entry '" + systemId + "' not found.");
             }
             //_jarFile.getInputStream(jarEntry);
             stream = conn.getJarFile().getInputStream(jarEntry);

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/FacesContextFactoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/FacesContextFactoryImpl.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/FacesContextFactoryImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/FacesContextFactoryImpl.java Tue Oct 13 17:42:36 2009
@@ -19,6 +19,8 @@
 package org.apache.myfaces.context;
 
 import java.lang.reflect.Field;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.faces.FacesException;
 import javax.faces.FactoryFinder;
@@ -30,8 +32,6 @@
 import javax.faces.lifecycle.Lifecycle;
 import javax.servlet.ServletContext;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.context.servlet.FacesContextImpl;
 
 /**
@@ -43,7 +43,8 @@
 public class FacesContextFactoryImpl extends FacesContextFactory
     implements ReleaseableFacesContextFactory
 {
-    private static final Log log = LogFactory.getLog(FacesContextFactoryImpl.class);
+    //private static final Log log = LogFactory.getLog(FacesContextFactoryImpl.class);
+    private static final Logger log = Logger.getLogger(FacesContextFactoryImpl.class.getName());
     
     /**
      * Reference to factory to prevent unnecessary lookups
@@ -85,14 +86,14 @@
         catch (SecurityException e)
         {
             // It could happen, but we can ignore it.
-            if (log.isDebugEnabled())
-                log.debug("Cannot access private field _firstInstance from ExternalContext ",e);
+            if (log.isLoggable(Level.FINE))
+                log.log(Level.FINE, "Cannot access private field _firstInstance from ExternalContext ",e);
         }
         catch (Exception e)
         {
             //It should not happen if we have only myfaces on classpath
-            if (log.isErrorEnabled())
-                log.error("Cannot found private field _firstInstance from ExternalContext ",e);
+            if (log.isLoggable(Level.SEVERE))
+                log.log(Level.SEVERE, "Cannot found private field _firstInstance from ExternalContext ",e);
         }
         
         _firstExternalContextInstance = firstExternalContextInstance;

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/PartialViewContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/PartialViewContextImpl.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/PartialViewContextImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/PartialViewContextImpl.java Tue Oct 13 17:42:36 2009
@@ -19,28 +19,26 @@
 package org.apache.myfaces.context.servlet;
 
 import java.io.IOException;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
-
-import javax.faces.FactoryFinder;
-import javax.faces.context.FacesContext;
-import javax.faces.context.PartialResponseWriter;
-import javax.faces.context.PartialViewContext;
-import javax.faces.event.PhaseId;
-import javax.faces.render.RenderKit;
-import javax.faces.render.RenderKitFactory;
+import javax.faces.component.UIComponent;
+import javax.faces.component.visit.VisitCallback;
 import javax.faces.component.visit.VisitContext;
 import javax.faces.component.visit.VisitHint;
-import javax.faces.component.visit.VisitCallback;
 import javax.faces.component.visit.VisitResult;
-import javax.faces.component.UIComponent;
-
 import javax.faces.context.ExternalContext;
+import javax.faces.context.FacesContext;
+import javax.faces.context.PartialResponseWriter;
+import javax.faces.context.PartialViewContext;
 import javax.faces.context.ResponseWriter;
-import javax.servlet.http.HttpServletRequest;
+import javax.faces.event.PhaseId;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.shared_impl.util.StringUtils;
 
 public class PartialViewContextImpl extends PartialViewContext {
@@ -350,9 +348,9 @@
                 writer.endUpdate();
             }
         } catch (IOException ex) {
-            Log log = LogFactory.getLog(PartialViewContextImpl.class);
-            if (log.isErrorEnabled()) {
-                log.error(ex);
+            Logger log = Logger.getLogger(PartialViewContextImpl.class.getName());
+            if (log.isLoggable(Level.SEVERE)) {
+                log.log(Level.SEVERE, "" , ex);
             }
 
         } finally {
@@ -362,9 +360,9 @@
                 }
                 writer.flush();
             } catch (IOException ex) {
-                Log log = LogFactory.getLog(PartialViewContextImpl.class);
-                if (log.isErrorEnabled()) {
-                    log.error(ex);
+                Logger log = Logger.getLogger(PartialViewContextImpl.class.getName());
+                if (log.isLoggable(Level.SEVERE)) {
+                    log.log(Level.SEVERE, "" , ex);
                 }
             }
 
@@ -436,18 +434,18 @@
                 inUpdate = true;
                 target.encodeAll(_facesContext);
             } catch (IOException ex) {
-                Log log = LogFactory.getLog(PartialViewContextImpl.class);
-                if (log.isErrorEnabled()) {
-                    log.error("IOException for rendering component", ex);
+                Logger log = Logger.getLogger(PartialViewContextImpl.class.getName());
+                if (log.isLoggable(Level.SEVERE)) {
+                    log.log(Level.SEVERE, "IOException for rendering component", ex);
                 }
             } finally {
                 if (inUpdate) {
                     try {
                         writer.endUpdate();
                     } catch (IOException ex) {
-                        Log log = LogFactory.getLog(PartialViewContextImpl.class);
-                        if (log.isErrorEnabled()) {
-                            log.error("IOException for rendering component, stopping update rendering", ex);
+                        Logger log = Logger.getLogger(PartialViewContextImpl.class.getName());
+                        if (log.isLoggable(Level.SEVERE)) {
+                            log.log(Level.SEVERE, "IOException for rendering component, stopping update rendering", ex);
                         }
                     }
                 }

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/context/servlet/ServletExternalContextImpl.java Tue Oct 13 17:42:36 2009
@@ -34,6 +34,7 @@
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
+import java.util.logging.Logger;
 
 import javax.faces.FacesException;
 import javax.faces.context.ExternalContext;
@@ -51,11 +52,8 @@
 import javax.servlet.http.HttpServletResponse;
 import javax.servlet.http.HttpSession;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.context.ReleaseableExternalContext;
 import org.apache.myfaces.context.flash.FlashImpl;
-import org.apache.myfaces.shared_impl.renderkit.html.HtmlResponseWriterImpl;
 import org.apache.myfaces.util.EnumerationIterator;
 
 /**
@@ -67,7 +65,8 @@
  */
 public final class ServletExternalContextImpl extends ExternalContext implements ReleaseableExternalContext
 {
-    private static final Log log = LogFactory.getLog(ServletExternalContextImpl.class);
+    //private static final Log log = LogFactory.getLog(ServletExternalContextImpl.class);
+    private static final Logger log = Logger.getLogger(ServletExternalContextImpl.class.getName());
 
     private static final String INIT_PARAMETER_MAP_ATTRIBUTE = InitParameterMap.class.getName();
     private static final String URL_PARAM_SEPERATOR="&";
@@ -710,7 +709,7 @@
         else
         {
             // I did not throw an exception just to be sure nothing breaks.
-            log.error("Cannot set content type. Response already committed");
+            log.severe("Cannot set content type. Response already committed");
         }
     }
 

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/convert/ValueBindingToValueExpression.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/convert/ValueBindingToValueExpression.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/convert/ValueBindingToValueExpression.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/convert/ValueBindingToValueExpression.java Tue Oct 13 17:42:36 2009
@@ -18,6 +18,9 @@
  */
 package org.apache.myfaces.el.convert;
 
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
 import javax.el.ELContext;
 import javax.el.ELException;
 import javax.el.PropertyNotFoundException;
@@ -28,8 +31,6 @@
 import javax.faces.el.EvaluationException;
 import javax.faces.el.ValueBinding;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.shared_impl.util.ClassUtils;
 
 /**
@@ -47,7 +48,8 @@
 {
     private static final long serialVersionUID = 8071429285360496554L;
 
-    private static final Log logger = LogFactory.getLog(ValueBindingToValueExpression.class);
+    //private static final Log logger = LogFactory.getLog(ValueBindingToValueExpression.class);
+    private static final Logger logger = Logger.getLogger(ValueBindingToValueExpression.class.getName());
 
     private ValueBinding _valueBinding;
 
@@ -194,7 +196,7 @@
             }
             catch (Throwable e)
             {
-                logger.warn("Could not determine expected type for '" + _valueBinding.getExpressionString() + "': "
+                logger.log(Level.WARNING, "Could not determine expected type for '" + _valueBinding.getExpressionString() + "': "
                         + e.getMessage(), e);
             }
         }

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ManagedBeanResolver.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ManagedBeanResolver.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ManagedBeanResolver.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/el/unified/resolver/ManagedBeanResolver.java Tue Oct 13 17:42:36 2009
@@ -24,6 +24,9 @@
 import java.util.Iterator;
 import java.util.List;
 import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
+
 import javax.el.ELContext;
 import javax.el.ELException;
 import javax.el.ELResolver;
@@ -31,8 +34,7 @@
 import javax.el.PropertyNotWritableException;
 import javax.faces.context.ExternalContext;
 import javax.faces.context.FacesContext;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+
 import org.apache.myfaces.config.ManagedBeanBuilder;
 import org.apache.myfaces.config.RuntimeConfig;
 import org.apache.myfaces.config.element.ManagedBean;
@@ -44,7 +46,8 @@
  */
 public class ManagedBeanResolver extends ELResolver
 {
-    private static final Log log = LogFactory.getLog(ManagedBeanResolver.class);
+    //private static final Log log = LogFactory.getLog(ManagedBeanResolver.class);
+    private static final Logger log = Logger.getLogger(ManagedBeanResolver.class.getName());
     private static final String BEANS_UNDER_CONSTRUCTION =
             "org.apache.myfaces.el.unified.resolver.managedbean.beansUnderConstruction";
 
@@ -231,8 +234,8 @@
 
         if (obj == null)
         {
-            if (log.isDebugEnabled())
-                log.debug("Variable '" + managedBeanName + "' could not be resolved.");
+            if (log.isLoggable(Level.FINE))
+                log.fine("Variable '" + managedBeanName + "' could not be resolved.");
         }
         else
         {
@@ -243,7 +246,7 @@
             final Scope scope = _scopes.get(scopeKey);
             if (scope == null)
             {
-                log.error("Managed bean '" + managedBeanName + "' has illegal scope: " + scopeKey);
+                log.severe("Managed bean '" + managedBeanName + "' has illegal scope: " + scopeKey);
             }
             else
             {

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/DefaultRestoreViewSupport.java Tue Oct 13 17:42:36 2009
@@ -19,8 +19,9 @@
 package org.apache.myfaces.lifecycle;
 
 import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
-import javax.el.ValueExpression;
 import javax.faces.FacesException;
 import javax.faces.application.ViewHandler;
 import javax.faces.component.UIComponent;
@@ -32,11 +33,8 @@
 import javax.faces.event.PostRestoreStateEvent;
 import javax.faces.render.ResponseStateManager;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.shared_impl.renderkit.RendererUtils;
 import org.apache.myfaces.shared_impl.util.Assert;
-import org.apache.myfaces.shared_impl.util.RestoreStateUtils;
 
 /**
  * @author Mathias Broekelmann (latest modification by $Author$)
@@ -48,7 +46,8 @@
 
     private static final String JAVAX_SERVLET_INCLUDE_PATH_INFO = "javax.servlet.include.path_info";
 
-    private final Log log = LogFactory.getLog(DefaultRestoreViewSupport.class);
+    //private final Log log = LogFactory.getLog(DefaultRestoreViewSupport.class);
+    private final Logger log = Logger.getLogger(DefaultRestoreViewSupport.class.getName());
 
     public void processComponentBinding(FacesContext facesContext, UIComponent component)
     {
@@ -84,12 +83,12 @@
         Map<String, Object> requestMap = externalContext.getRequestMap();
 
         String viewId = (String) requestMap.get(JAVAX_SERVLET_INCLUDE_PATH_INFO);
-        boolean traceEnabled = log.isTraceEnabled();
+        boolean traceEnabled = log.isLoggable(Level.FINEST);
         if (viewId != null)
         {
             if (traceEnabled)
             {
-                log.trace("Calculated viewId '" + viewId + "' from request param '" + JAVAX_SERVLET_INCLUDE_PATH_INFO
+                log.finest("Calculated viewId '" + viewId + "' from request param '" + JAVAX_SERVLET_INCLUDE_PATH_INFO
                         + "'");
             }
         }
@@ -98,7 +97,7 @@
             viewId = externalContext.getRequestPathInfo();
             if (viewId != null && traceEnabled)
             {
-                log.trace("Calculated viewId '" + viewId + "' from request path info");
+                log.finest("Calculated viewId '" + viewId + "' from request path info");
             }
         }
 
@@ -107,7 +106,7 @@
             viewId = (String) requestMap.get(JAVAX_SERVLET_INCLUDE_SERVLET_PATH);
             if (viewId != null && traceEnabled)
             {
-                log.trace("Calculated viewId '" + viewId + "' from request param '"
+                log.finest("Calculated viewId '" + viewId + "' from request param '"
                         + JAVAX_SERVLET_INCLUDE_SERVLET_PATH + "'");
             }
         }
@@ -117,7 +116,7 @@
             viewId = externalContext.getRequestServletPath();
             if (viewId != null && traceEnabled)
             {
-                log.trace("Calculated viewId '" + viewId + "' from request servlet path");
+                log.finest("Calculated viewId '" + viewId + "' from request servlet path");
             }
         }
 

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/LifecycleImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/LifecycleImpl.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/LifecycleImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/LifecycleImpl.java Tue Oct 13 17:42:36 2009
@@ -20,6 +20,8 @@
 
 import java.util.ArrayList;
 import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.faces.FacesException;
 import javax.faces.context.FacesContext;
@@ -30,12 +32,10 @@
 import javax.faces.event.PhaseListener;
 import javax.faces.lifecycle.Lifecycle;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.util.DebugUtils;
 import org.apache.myfaces.config.FacesConfigurator;
 import org.apache.myfaces.shared_impl.util.ClassUtils;
 import org.apache.myfaces.shared_impl.webapp.webxml.WebXml;
+import org.apache.myfaces.util.DebugUtils;
 
 /**
  * Implements the lifecycle as described in Spec. 1.0 PFD Chapter 2
@@ -45,7 +45,8 @@
  */
 public class LifecycleImpl extends Lifecycle
 {
-    private static final Log log = LogFactory.getLog(LifecycleImpl.class);
+    //private static final Log log = LogFactory.getLog(LifecycleImpl.class);
+    private static final Logger log = Logger.getLogger(LifecycleImpl.class.getName());
 
     private PhaseExecutor[] lifecycleExecutors;
     private PhaseExecutor renderExecutor;
@@ -93,9 +94,9 @@
     {
         boolean skipFurtherProcessing = false;
 
-        if (log.isTraceEnabled())
+        if (log.isLoggable(Level.FINEST))
         {
-            log.trace("entering " + executor.getPhase() + " in " + LifecycleImpl.class.getName());
+            log.finest("entering " + executor.getPhase() + " in " + LifecycleImpl.class.getName());
         }
 
         PhaseId currentPhaseId = executor.getPhase();
@@ -152,9 +153,9 @@
             skipFurtherProcessing = true;
         }
 
-        if (!skipFurtherProcessing && log.isTraceEnabled())
+        if (!skipFurtherProcessing && log.isLoggable(Level.FINEST))
         {
-            log.trace("exiting " + executor.getPhase() + " in " + LifecycleImpl.class.getName());
+            log.finest("exiting " + executor.getPhase() + " in " + LifecycleImpl.class.getName());
         }
 
         return skipFurtherProcessing;
@@ -168,8 +169,8 @@
         {
             return;
         }
-        if (log.isTraceEnabled())
-            log.trace("entering " + renderExecutor.getPhase() + " in " + LifecycleImpl.class.getName());
+        if (log.isLoggable(Level.FINEST))
+            log.finest("entering " + renderExecutor.getPhase() + " in " + LifecycleImpl.class.getName());
 
         PhaseListenerManager phaseListenerMgr = new PhaseListenerManager(this, facesContext, getPhaseListeners());
         Flash flash = facesContext.getExternalContext().getFlash();
@@ -203,15 +204,15 @@
         
         facesContext.getExceptionHandler().handle();
         
-        if (log.isTraceEnabled())
+        if (log.isLoggable(Level.FINEST))
         {
             // Note: DebugUtils Logger must also be in trace level
             DebugUtils.traceView("View after rendering");
         }
 
-        if (log.isTraceEnabled())
+        if (log.isLoggable(Level.FINEST))
         {
-            log.trace("exiting " + renderExecutor.getPhase() + " in " + LifecycleImpl.class.getName());
+            log.finest("exiting " + renderExecutor.getPhase() + " in " + LifecycleImpl.class.getName());
         }
     }
 
@@ -220,9 +221,9 @@
         boolean flag = false;
         if (facesContext.getResponseComplete())
         {
-            if (log.isDebugEnabled())
+            if (log.isLoggable(Level.FINE))
             {
-                log.debug("exiting from lifecycle.execute in " + phase
+                log.fine("exiting from lifecycle.execute in " + phase
                         + " because getResponseComplete is true from one of the " + (before ? "before" : "after")
                         + " listeners");
             }
@@ -236,9 +237,9 @@
         boolean flag = false;
         if (facesContext.getRenderResponse())
         {
-            if (log.isDebugEnabled())
+            if (log.isLoggable(Level.FINE))
             {
-                log.debug("exiting from lifecycle.execute in " + phase
+                log.fine("exiting from lifecycle.execute in " + phase
                         + " because getRenderResponse is true from one of the " + (before ? "before" : "after")
                         + " listeners");
             }

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/lifecycle/RestoreViewExecutor.java Tue Oct 13 17:42:36 2009
@@ -19,6 +19,8 @@
 package org.apache.myfaces.lifecycle;
 
 import java.util.Collection;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.faces.FacesException;
 import javax.faces.application.Application;
@@ -32,9 +34,6 @@
 import javax.faces.view.ViewDeclarationLanguage;
 import javax.faces.view.ViewMetadata;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
 /**
  * Implements the Restore View Phase (JSF Spec 2.2.1)
  * 
@@ -46,7 +45,9 @@
 class RestoreViewExecutor implements PhaseExecutor
 {
 
-    private static final Log log = LogFactory.getLog(RestoreViewExecutor.class);
+    //private static final Log log = LogFactory.getLog(RestoreViewExecutor.class);
+    private static final Logger log = Logger.getLogger(RestoreViewExecutor.class.getName());
+    
     private RestoreViewSupport _restoreViewSupport;
 
     public boolean execute(FacesContext facesContext)
@@ -70,8 +71,8 @@
         // Examine the FacesContext instance for the current request. If it already contains a UIViewRoot
         if (viewRoot != null)
         {
-            if (log.isTraceEnabled())
-                log.trace("View already exists in the FacesContext");
+            if (log.isLoggable(Level.FINEST))
+                log.finest("View already exists in the FacesContext");
             
             // Set the locale on this UIViewRoot to the value returned by the getRequestLocale() method on the
             // ExternalContext for this request
@@ -86,8 +87,8 @@
         // Determine if this request is a postback or initial request
         if (restoreViewSupport.isPostback(facesContext))
         { // If the request is a postback
-            if (log.isTraceEnabled())
-                log.trace("Request is a postback");
+            if (log.isLoggable(Level.FINEST))
+                log.finest("Request is a postback");
 
             try
             {
@@ -118,8 +119,8 @@
         }
         else
         { // If the request is a non-postback
-            if (log.isTraceEnabled())
-                log.trace("Request is not a postback. New UIViewRoot will be created");
+            if (log.isLoggable(Level.FINEST))
+                log.finest("Request is not a postback. New UIViewRoot will be created");
             
             ViewDeclarationLanguage vdl = viewHandler.getViewDeclarationLanguage(facesContext, 
                     viewHandler.deriveViewId(facesContext, viewId));

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/RenderKitFactoryImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/RenderKitFactoryImpl.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/RenderKitFactoryImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/RenderKitFactoryImpl.java Tue Oct 13 17:42:36 2009
@@ -18,16 +18,16 @@
  */
 package org.apache.myfaces.renderkit;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.faces.FacesException;
 import javax.faces.context.FacesContext;
 import javax.faces.render.RenderKit;
 import javax.faces.render.RenderKitFactory;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.Map;
 
 /**
  * RenderKitFactory implementation as defined in Spec. JSF.7.3
@@ -37,7 +37,8 @@
  */
 public class RenderKitFactoryImpl extends RenderKitFactory
 {
-    private static final Log log = LogFactory.getLog(RenderKitFactoryImpl.class);
+    //private static final Log log = LogFactory.getLog(RenderKitFactoryImpl.class);
+    private static final Logger log = Logger.getLogger(RenderKitFactoryImpl.class.getName());
 
     private Map<String, RenderKit> _renderkits = new HashMap<String, RenderKit>();
 
@@ -57,7 +58,7 @@
             throw new NullPointerException("renderKitId");
         if (renderKit == null)
             throw new NullPointerException("renderKit");
-        if (log.isInfoEnabled())
+        if (log.isLoggable(Level.INFO))
         {
             if (_renderkits.containsKey(renderKitId))
             {
@@ -80,7 +81,7 @@
             // "If there is no registered RenderKit for the specified identifier, return null"
             // vs "IllegalArgumentException - if no RenderKit instance can be returned for the specified identifier"
             // First sentence is more precise, so we just log a warning
-            log.warn("Unknown RenderKit '" + renderKitId + "'.");
+            log.warning("Unknown RenderKit '" + renderKitId + "'.");
         }
         return renderkit;
     }

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlCompositeComponentRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlCompositeComponentRenderer.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlCompositeComponentRenderer.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlCompositeComponentRenderer.java Tue Oct 13 17:42:36 2009
@@ -19,12 +19,12 @@
 package org.apache.myfaces.renderkit.html;
 
 import java.io.IOException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFRenderer;
 import org.apache.myfaces.shared_impl.renderkit.html.HtmlRenderer;
 
@@ -36,7 +36,8 @@
 @JSFRenderer(renderKitId = "HTML_BASIC", family = "javax.faces.NamingContainer", type = "javax.faces.Composite")
 public class HtmlCompositeComponentRenderer extends HtmlRenderer
 {
-    private static final Log log = LogFactory.getLog(HtmlCompositeComponentRenderer.class);
+    //private static final Log log = LogFactory.getLog(HtmlCompositeComponentRenderer.class);
+    private static final Logger log = Logger.getLogger(HtmlCompositeComponentRenderer.class.getName());
     
     public boolean getRendersChildren()
     {
@@ -60,9 +61,9 @@
         
         if (compositeFacet == null)
         {
-            if (log.isErrorEnabled())
+            if (log.isLoggable(Level.SEVERE))
             {
-                log.error("facet UIComponent.COMPOSITE_FACET_NAME not found when rendering composite component "+
+                log.severe("facet UIComponent.COMPOSITE_FACET_NAME not found when rendering composite component "+
                         component.getClientId(context));
             }
             return;            

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlCompositeFacetRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlCompositeFacetRenderer.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlCompositeFacetRenderer.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlCompositeFacetRenderer.java Tue Oct 13 17:42:36 2009
@@ -19,12 +19,11 @@
 package org.apache.myfaces.renderkit.html;
 
 import java.io.IOException;
+import java.util.logging.Logger;
 
 import javax.faces.component.UIComponent;
 import javax.faces.context.FacesContext;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFRenderer;
 import org.apache.myfaces.shared_impl.renderkit.html.HtmlRenderer;
 
@@ -36,7 +35,8 @@
 @JSFRenderer(renderKitId = "HTML_BASIC", family = "javax.faces.Output", type = "javax.faces.CompositeFacet")
 public class HtmlCompositeFacetRenderer extends HtmlRenderer
 {
-    private static final Log log = LogFactory.getLog(HtmlCompositeFacetRenderer.class);
+    //private static final Log log = LogFactory.getLog(HtmlCompositeFacetRenderer.class);
+    private static final Logger log = Logger.getLogger(HtmlCompositeFacetRenderer.class.getName());
     
     public boolean getRendersChildren()
     {

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlFormatRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlFormatRenderer.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlFormatRenderer.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlFormatRenderer.java Tue Oct 13 17:42:36 2009
@@ -22,6 +22,8 @@
 import java.text.MessageFormat;
 import java.util.ArrayList;
 import java.util.List;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIOutput;
@@ -29,8 +31,6 @@
 import javax.faces.component.html.HtmlOutputFormat;
 import javax.faces.context.FacesContext;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFRenderer;
 import org.apache.myfaces.shared_impl.renderkit.JSFAttr;
 import org.apache.myfaces.shared_impl.renderkit.RendererUtils;
@@ -46,7 +46,8 @@
 @JSFRenderer(renderKitId = "HTML_BASIC", family = "javax.faces.Output", type = "javax.faces.Format")
 public class HtmlFormatRenderer extends HtmlRenderer
 {
-    private static final Log log = LogFactory.getLog(HtmlFormatRenderer.class);
+    //private static final Log log = LogFactory.getLog(HtmlFormatRenderer.class);
+    private static final Logger log = Logger.getLogger(HtmlFormatRenderer.class.getName());
 
     private static final Object[] EMPTY_ARGS = new Object[0];
 
@@ -113,7 +114,7 @@
         }
         catch (Exception e)
         {
-            log.error("Error formatting message of component " + htmlOutputFormat.getClientId(facesContext));
+            log.log(Level.SEVERE, "Error formatting message of component " + htmlOutputFormat.getClientId(facesContext));
             return "";
         }
     }

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlLabelRenderer.java Tue Oct 13 17:42:36 2009
@@ -21,6 +21,8 @@
 import java.io.IOException;
 import java.util.List;
 import java.util.Map;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.faces.component.UIComponent;
 import javax.faces.component.ValueHolder;
@@ -30,8 +32,6 @@
 import javax.faces.context.FacesContext;
 import javax.faces.context.ResponseWriter;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFRenderer;
 import org.apache.myfaces.shared_impl.renderkit.JSFAttr;
 import org.apache.myfaces.shared_impl.renderkit.RendererUtils;
@@ -50,7 +50,8 @@
 @JSFRenderer(renderKitId = "HTML_BASIC", family = "javax.faces.Output", type = "javax.faces.Label")
 public class HtmlLabelRenderer extends HtmlRenderer
 {
-    private static final Log log = LogFactory.getLog(HtmlLabelRenderer.class);
+    //private static final Log log = LogFactory.getLog(HtmlLabelRenderer.class);
+    private static final Logger log = Logger.getLogger(HtmlLabelRenderer.class.getName());
 
     @Override
     public void encodeBegin(FacesContext facesContext, UIComponent uiComponent) throws IOException
@@ -92,9 +93,9 @@
         }
         else
         {
-            if (log.isWarnEnabled())
+            if (log.isLoggable(Level.WARNING))
             {
-                log.warn("Attribute 'for' of label component with id " + uiComponent.getClientId(facesContext)
+                log.warning("Attribute 'for' of label component with id " + uiComponent.getClientId(facesContext)
                         + " is not defined");
             }
         }

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlRenderKitImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlRenderKitImpl.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlRenderKitImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlRenderKitImpl.java Tue Oct 13 17:42:36 2009
@@ -23,12 +23,12 @@
 import java.io.Writer;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Iterator;
-import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.faces.context.ResponseStream;
 import javax.faces.context.ResponseWriter;
@@ -37,8 +37,6 @@
 import javax.faces.render.Renderer;
 import javax.faces.render.ResponseStateManager;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFRenderKit;
 import org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils;
 import org.apache.myfaces.shared_impl.renderkit.html.HtmlResponseWriterImpl;
@@ -50,7 +48,8 @@
 @JSFRenderKit(renderKitId = "HTML_BASIC")
 public class HtmlRenderKitImpl extends RenderKit
 {
-    private static final Log log = LogFactory.getLog(HtmlRenderKitImpl.class);
+    //private static final Log log = LogFactory.getLog(HtmlRenderKitImpl.class);
+    private static final Logger log = Logger.getLogger(HtmlRenderKitImpl.class.getName());
 
     // ~ Instance fields ----------------------------------------------------------------------------
 
@@ -122,7 +121,7 @@
         }
         if (renderer == null)
         {
-            log.warn("Unsupported component-family/renderer-type: " + componentFamily + "/" + rendererType);
+            log.warning("Unsupported component-family/renderer-type: " + componentFamily + "/" + rendererType);
         }
         return renderer;
     }
@@ -132,24 +131,24 @@
     {
         if (componentFamily == null)
         {
-            log.error("addRenderer: componentFamily = null is not allowed");
+            log.severe("addRenderer: componentFamily = null is not allowed");
             throw new NullPointerException("component family must not be null.");
         }
         if (rendererType == null)
         {
-            log.error("addRenderer: rendererType = null is not allowed");
+            log.severe("addRenderer: rendererType = null is not allowed");
             throw new NullPointerException("renderer type must not be null.");
         }
         if (renderer == null)
         {
-            log.error("addRenderer: renderer = null is not allowed");
+            log.severe("addRenderer: renderer = null is not allowed");
             throw new NullPointerException("renderer must not be null.");
         }
         
         _put(componentFamily, rendererType, renderer);
 
-        if (log.isTraceEnabled())
-            log.trace("add Renderer family = " + componentFamily + " rendererType = " + rendererType
+        if (log.isLoggable(Level.FINEST))
+            log.finest("add Renderer family = " + componentFamily + " rendererType = " + rendererType
                     + " renderer class = " + renderer.getClass().getName());
     }
     
@@ -174,7 +173,7 @@
                 // this is not necessarily an error, but users do need to be
                 // very careful about jar processing order when overriding
                 // some component's renderer with an alternate renderer.
-                log.debug("Overwriting renderer with family = " + componentFamily +
+                log.fine("Overwriting renderer with family = " + componentFamily +
                    " rendererType = " + rendererType +
                    " renderer class = " + renderer.getClass().getName());
             }

Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java?rev=824859&r1=824858&r2=824859&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/renderkit/html/HtmlResponseStateManager.java Tue Oct 13 17:42:36 2009
@@ -18,14 +18,9 @@
  */
 package org.apache.myfaces.renderkit.html;
 
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.myfaces.renderkit.MyfacesResponseStateManager;
-import org.apache.myfaces.shared_impl.config.MyfacesConfig;
-import org.apache.myfaces.shared_impl.renderkit.html.HTML;
-import org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils;
-import org.apache.myfaces.shared_impl.renderkit.html.util.JavascriptUtils;
-import org.apache.myfaces.shared_impl.util.StateUtils;
+import java.io.IOException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 import javax.faces.FacesException;
 import javax.faces.application.StateManager;
@@ -35,7 +30,13 @@
 import javax.faces.context.ResponseWriter;
 import javax.faces.render.RenderKitFactory;
 import javax.faces.render.ResponseStateManager;
-import java.io.IOException;
+
+import org.apache.myfaces.renderkit.MyfacesResponseStateManager;
+import org.apache.myfaces.shared_impl.config.MyfacesConfig;
+import org.apache.myfaces.shared_impl.renderkit.html.HTML;
+import org.apache.myfaces.shared_impl.renderkit.html.HtmlRendererUtils;
+import org.apache.myfaces.shared_impl.renderkit.html.util.JavascriptUtils;
+import org.apache.myfaces.shared_impl.util.StateUtils;
 
 /**
  * @author Manfred Geiler (latest modification by $Author$)
@@ -43,7 +44,8 @@
  */
 public class HtmlResponseStateManager extends MyfacesResponseStateManager
 {
-    private static final Log log = LogFactory.getLog(HtmlResponseStateManager.class);
+    //private static final Log log = LogFactory.getLog(HtmlResponseStateManager.class);
+    private static final Logger log = Logger.getLogger(HtmlResponseStateManager.class.getName());
 
     private static final int TREE_PARAM = 0;
     private static final int STATE_PARAM = 1;
@@ -60,8 +62,8 @@
 
         if (facescontext.getApplication().getStateManager().isSavingStateInClient(facescontext))
         {
-            if (log.isTraceEnabled())
-                log.trace("Writing state in client");
+            if (log.isLoggable(Level.FINEST))
+                log.finest("Writing state in client");
             Object treeStruct = serializedview.getStructure();
             Object compStates = serializedview.getState();
 
@@ -71,8 +73,8 @@
             }
             else
             {
-                if (log.isTraceEnabled())
-                    log.trace("No tree structure to be saved in client response!");
+                if (log.isLoggable(Level.FINEST))
+                    log.finest("No tree structure to be saved in client response!");
             }
 
             if (compStates != null)
@@ -81,14 +83,14 @@
             }
             else
             {
-                if (log.isTraceEnabled())
-                    log.trace("No component states to be saved in client response!");
+                if (log.isLoggable(Level.FINEST))
+                    log.finest("No component states to be saved in client response!");
             }
         }
         else
         {
-            if (log.isTraceEnabled())
-                log.trace("Writing state in server");
+            if (log.isLoggable(Level.FINEST))
+                log.finest("Writing state in server");
             // write viewSequence
             Object treeStruct = serializedview.getStructure();
             if (treeStruct != null)
@@ -102,8 +104,8 @@
 
         savedState[VIEWID_PARAM] = facescontext.getViewRoot().getViewId();
 
-        if (log.isTraceEnabled())
-            log.trace("Writing view state and renderKit fields");
+        if (log.isLoggable(Level.FINEST))
+            log.finest("Writing view state and renderKit fields");
 
         // write the view state field
         writeViewStateField(facescontext, responseWriter, savedState);
@@ -215,9 +217,9 @@
         if (restoredViewId == null)
         {
             // no saved state or state of different viewId
-            if (log.isTraceEnabled())
+            if (log.isLoggable(Level.FINEST))
             {
-                log.trace("No saved state or state of a different viewId: " + restoredViewId);
+                log.finest("No saved state or state of a different viewId: " + restoredViewId);
             }
 
             return null;