From: Leif Åstrand Date: Tue, 10 Apr 2012 12:52:40 +0000 (+0300) Subject: Disable excessive debug logging X-Git-Tag: 7.0.0.alpha2~65^2~10^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5bbaf07dc79354ac600f8224e45377bfb5230e7f;p=vaadin-framework.git Disable excessive debug logging --- diff --git a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java index 349fef7194..ca771cab39 100644 --- a/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java +++ b/src/com/vaadin/terminal/gwt/client/ApplicationConnection.java @@ -122,6 +122,8 @@ public class ApplicationConnection { */ public static final String UIDL_REFRESH_TOKEN = "Vaadin-Refresh"; + private final boolean debugLogging = false; + // will hold the UIDL security key (for XSS protection) once received private String uidlSecurityKey = "init"; @@ -1002,11 +1004,13 @@ public class ApplicationConnection { public void execute() { MultiStepDuration updateDuration = new MultiStepDuration(); - VConsole.log(" * Dumping UIDL to the console"); - VConsole.dirUIDL(json, configuration); + if (debugLogging) { + VConsole.log(" * Dumping UIDL to the console"); + VConsole.dirUIDL(json, configuration); - updateDuration.logDuration( - " * Dumping UIDL to the console completed", 10); + updateDuration.logDuration( + " * Dumping UIDL to the console completed", 10); + } if (json.containsKey("locales")) { VConsole.log(" * Handling locales"); diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java index 7d70729147..acf525bffb 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java @@ -37,7 +37,7 @@ public abstract class AbstractComponentContainerConnector extends List children; - private boolean debugLogging = false; + private final boolean debugLogging = false; /** * Default constructor diff --git a/src/com/vaadin/terminal/gwt/client/ui/AbstractConnector.java b/src/com/vaadin/terminal/gwt/client/ui/AbstractConnector.java index 9b32399271..12e19b2a70 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/AbstractConnector.java +++ b/src/com/vaadin/terminal/gwt/client/ui/AbstractConnector.java @@ -177,7 +177,10 @@ public abstract class AbstractConnector implements ServerConnector, * @see com.vaadin.terminal.gwt.client.ServerConnector#onUnregister() */ public void onUnregister() { - VConsole.log("Unregistered connector " + Util.getConnectorString(this)); + if (debugLogging) { + VConsole.log("Unregistered connector " + + Util.getConnectorString(this)); + } } }