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 2011/05/19 03:44:37 UTC

svn commit: r1124502 - /myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlGridRendererBase.java

Author: lu4242
Date: Thu May 19 01:44:37 2011
New Revision: 1124502

URL: http://svn.apache.org/viewvc?rev=1124502&view=rev
Log:
render log message only on dev stage.

Modified:
    myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlGridRendererBase.java

Modified: myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlGridRendererBase.java
URL: http://svn.apache.org/viewvc/myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlGridRendererBase.java?rev=1124502&r1=1124501&r2=1124502&view=diff
==============================================================================
--- myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlGridRendererBase.java (original)
+++ myfaces/shared/trunk_4.0.x/core/src/main/java/org/apache/myfaces/shared/renderkit/html/HtmlGridRendererBase.java Thu May 19 01:44:37 2011
@@ -25,6 +25,7 @@ import java.util.Map;
 import java.util.logging.Level;
 import java.util.logging.Logger;
 
+import javax.faces.application.ProjectStage;
 import javax.faces.component.UIComponent;
 import javax.faces.component.UIPanel;
 import javax.faces.component.behavior.ClientBehavior;
@@ -326,7 +327,11 @@ public class HtmlGridRendererBase
             {
                 if (columnIndex > 0)
                 {
-                    if (log.isLoggable(Level.WARNING)) log.warning("PanelGrid " + component.getClientId(context) + " has not enough children. Child count should be a multiple of the columns attribute.");
+                    Level level = context.isProjectStage(ProjectStage.Production) ? Level.FINE : Level.WARNING;
+                    if (log.isLoggable(level))
+                    {
+                        log.log(level, "PanelGrid " + RendererUtils.getPathToComponent(component) + " has not enough children. Child count should be a multiple of the columns attribute.");
+                    }
                     //Render empty columns, so that table is correct
                     for ( ; columnIndex < columns; columnIndex++)
                     {