myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject svn commit: r802686 - in /myfaces/tobago/trunk: core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIGridLayout.java core/src/main/java/org/apache/myfaces/tobago/layout/math/SystemOfEquations.java example/test/src/main/resources/log4j.xml
Date Mon, 10 Aug 2009 08:12:44 GMT
Author: lofwyr
Date: Mon Aug 10 08:12:43 2009
New Revision: 802686

URL: http://svn.apache.org/viewvc?rev=802686&view=rev
Log:
TOBAGO-606: Layout-Manager
 - less logging

Modified:
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIGridLayout.java
    myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/SystemOfEquations.java
    myfaces/tobago/trunk/example/test/src/main/resources/log4j.xml

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIGridLayout.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIGridLayout.java?rev=802686&r1=802685&r2=802686&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIGridLayout.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/component/AbstractUIGridLayout.java
Mon Aug 10 08:12:43 2009
@@ -53,11 +53,6 @@
   // XXX rows and rowTokens are double/redundant
   private LayoutTokens rowTokens;
 
-  public AbstractUIGridLayout() {
-    LOG.info("**************************************************************************************"
-        + " Constructor AbstractUIGridLayout");
-  }
-
   public void onComponentCreated(FacesContext context, UIComponent component) {
 
     columnTokens = LayoutTokens.parse(getColumns());
@@ -87,7 +82,9 @@
     List<LayoutComponent> components = container.getComponents();
     for (LayoutComponent c : components) {
       grid.add(new OriginCell(c), c.getColumnSpan(), c.getRowSpan());
-      LOG.debug("\n" + grid);
+      if (LOG.isDebugEnabled()) {
+        LOG.debug("\n" + grid);
+      }
     }
 
     addPixelConstraints(layoutContext, horizontalIndex + 1, verticalIndex + 1);
@@ -170,7 +167,7 @@
             if (layoutManager != null) {
               layoutManager.distribute(layoutContext, subContainer);
             }
-          } 
+          }
         }
       }
     }
@@ -242,7 +239,7 @@
     for (int i = 0; i < rowTokens.getSize(); i++) {
       LayoutToken layoutToken = rowTokens.get(i);
       if (layoutToken instanceof PixelLayoutToken) {
-         // XXX PixelLayoutToken might be removed/changed
+        // XXX PixelLayoutToken might be removed/changed
         Measure pixel = new PixelMeasure(((PixelLayoutToken) layoutToken).getPixel());
         layoutContext.getVertical().setFixedLength(i + verticalIndexOffset, pixel,
             ClassUtils.getShortClassName(getParent(), "null"));

Modified: myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/SystemOfEquations.java
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/SystemOfEquations.java?rev=802686&r1=802685&r2=802686&view=diff
==============================================================================
--- myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/SystemOfEquations.java
(original)
+++ myfaces/tobago/trunk/core/src/main/java/org/apache/myfaces/tobago/layout/math/SystemOfEquations.java
Mon Aug 10 08:12:43 2009
@@ -132,7 +132,9 @@
       equations.add(new ZeroEquation());
     }
 
-    LOG.info("Before sorting: " + this);
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("Before sorting: " + this);
+    }
 
     Collections.sort(equations, new EquationComparator());
 
@@ -154,7 +156,9 @@
 
   private void gauss() {
 
-    LOG.info(this);
+    if (LOG.isDebugEnabled()) {
+      LOG.debug(this);
+    }
 
     assert step == Step.PREPARED;
     step = step.next();
@@ -163,7 +167,9 @@
 
     for (int j = 0; j < min; j++) {
       // normalize row
-      LOG.info(this);
+      if (LOG.isDebugEnabled()) {
+        LOG.debug(this);
+      }
       double factor = data[j][j];
       if (MathUtils.isZero(factor)) {
         int nonZeroIndex = findNonZero(j);
@@ -197,7 +203,9 @@
     assert step == Step.TRIANGULAR;
     step = step.next();
 
-    LOG.info(this);
+    if (LOG.isDebugEnabled()) {
+      LOG.debug(this);
+    }
     for (int j = equations.size() - 1; j >= 0; j--) {
       if (rowNull(j)) {
         LOG.error("Not solvable: " + this);
@@ -214,7 +222,9 @@
   private Measure[] result() {
     assert step == Step.DIAGONAL;
 
-    LOG.info(this);
+    if (LOG.isDebugEnabled()) {
+      LOG.debug(this);
+    }
 
     double[] original = copyResult();
 
@@ -222,7 +232,9 @@
 
     Measure[] rounded = copyResultMeasure();
 
-    LOG.info("after adjust remainders:  " + Arrays.toString(rounded));
+    if (LOG.isDebugEnabled()) {
+      LOG.debug("after adjust remainders:  " + Arrays.toString(rounded));
+    }
 
     return rounded;
   }
@@ -282,7 +294,9 @@
         } else {
           data[index][numberOfVariables] = Math.round(old);
         }
-        LOG.info("Change value for index=" + index + " from " + old + " -> " + Math.round(sum));
+        if (LOG.isDebugEnabled()) {
+          LOG.debug("Change value for index=" + index + " from " + old + " -> " + Math.round(sum));
+        }
 
       } //else if (equation instanceof )
     }

Modified: myfaces/tobago/trunk/example/test/src/main/resources/log4j.xml
URL: http://svn.apache.org/viewvc/myfaces/tobago/trunk/example/test/src/main/resources/log4j.xml?rev=802686&r1=802685&r2=802686&view=diff
==============================================================================
--- myfaces/tobago/trunk/example/test/src/main/resources/log4j.xml (original)
+++ myfaces/tobago/trunk/example/test/src/main/resources/log4j.xml Mon Aug 10 08:12:43 2009
@@ -34,11 +34,9 @@
     <priority value="debug" />
   </category>
   
-<!--
-  <category name="org.apache.myfaces.tobago.context.ResourceLocator">
-    <priority value="debug" />
+  <category name="org.apache.myfaces.tobago.layout">
+    <priority value="info" />
   </category>
--->
 
   <root>
     <priority value="info" />



Mime
View raw message