]> source.dussan.org Git - vaadin-framework.git/commitdiff
Disabled excessive debug logging
authorArtur Signell <artur@vaadin.com>
Tue, 10 Apr 2012 12:28:09 +0000 (15:28 +0300)
committerArtur Signell <artur@vaadin.com>
Tue, 10 Apr 2012 12:29:02 +0000 (15:29 +0300)
src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java
src/com/vaadin/terminal/gwt/client/ui/AbstractConnector.java

index 2e26a06d1e9aa08bb80a01bd7dc3f8cc2c2f2254..7d707291476faf549a4687e37dc7012cda02c8c6 100644 (file)
@@ -37,6 +37,8 @@ public abstract class AbstractComponentContainerConnector extends
 
     List<ComponentConnector> children;
 
+    private boolean debugLogging = false;
+
     /**
      * Default constructor
      */
@@ -77,19 +79,21 @@ public abstract class AbstractComponentContainerConnector extends
      * (com.vaadin.terminal.gwt.client.ConnectorHierarchyChangedEvent)
      */
     public void onConnectorHierarchyChange(ConnectorHierarchyChangeEvent event) {
-        // TODO Remove debug info
-        VConsole.log("Hierarchy changed for " + Util.getConnectorString(this));
-        String oldChildren = "* Old children: ";
-        for (ComponentConnector child : event.getOldChildren()) {
-            oldChildren += Util.getConnectorString(child) + " ";
-        }
-        VConsole.log(oldChildren);
+        if (debugLogging) {
+            VConsole.log("Hierarchy changed for "
+                    + Util.getConnectorString(this));
+            String oldChildren = "* Old children: ";
+            for (ComponentConnector child : event.getOldChildren()) {
+                oldChildren += Util.getConnectorString(child) + " ";
+            }
+            VConsole.log(oldChildren);
 
-        String newChildren = "* New children: ";
-        for (ComponentConnector child : getChildren()) {
-            newChildren += Util.getConnectorString(child) + " ";
+            String newChildren = "* New children: ";
+            for (ComponentConnector child : getChildren()) {
+                newChildren += Util.getConnectorString(child) + " ";
+            }
+            VConsole.log(newChildren);
         }
-        VConsole.log(newChildren);
     }
 
     public HandlerRegistration addConnectorHierarchyChangeHandler(
index c89a5d0854f0ceb913bdda7a28aa25c76db5fe3f..9b323992713f1385ddad4509324dafde0576086b 100644 (file)
@@ -36,6 +36,7 @@ public abstract class AbstractConnector implements ServerConnector,
 
     private HandlerManager handlerManager;
     private Map<String, Collection<ClientRpc>> rpcImplementations;
+    private final boolean debugLogging = false;
 
     /*
      * (non-Javadoc)
@@ -163,9 +164,11 @@ public abstract class AbstractConnector implements ServerConnector,
     }
 
     public void onStateChanged(StateChangeEvent stateChangeEvent) {
-        VConsole.log("State change event for "
-                + Util.getConnectorString(stateChangeEvent.getConnector())
-                + " received by " + Util.getConnectorString(this));
+        if (debugLogging) {
+            VConsole.log("State change event for "
+                    + Util.getConnectorString(stateChangeEvent.getConnector())
+                    + " received by " + Util.getConnectorString(this));
+        }
     }
 
     /*