From 66c98850bf12bc9dd6010a2db8907cb2a5ef5e85 Mon Sep 17 00:00:00 2001 From: Artur Signell Date: Tue, 10 Apr 2012 15:28:09 +0300 Subject: [PATCH] Disabled excessive debug logging --- .../AbstractComponentContainerConnector.java | 26 +++++++++++-------- .../gwt/client/ui/AbstractConnector.java | 9 ++++--- 2 files changed, 21 insertions(+), 14 deletions(-) diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java index 2e26a06d1e..7d70729147 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java @@ -37,6 +37,8 @@ public abstract class AbstractComponentContainerConnector extends List 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( diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractConnector.java index c89a5d0854..9b32399271 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AbstractConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractConnector.java @@ -36,6 +36,7 @@ public abstract class AbstractConnector implements ServerConnector, private HandlerManager handlerManager; private Map> 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)); + } } /* -- 2.39.5