]> source.dussan.org Git - vaadin-framework.git/commitdiff
Disable excessive debug logging
authorLeif Åstrand <leif@vaadin.com>
Tue, 10 Apr 2012 12:52:40 +0000 (15:52 +0300)
committerLeif Åstrand <leif@vaadin.com>
Tue, 10 Apr 2012 12:52:40 +0000 (15:52 +0300)
src/com/vaadin/terminal/gwt/client/ApplicationConnection.java
src/com/vaadin/terminal/gwt/client/ui/AbstractComponentContainerConnector.java
src/com/vaadin/terminal/gwt/client/ui/AbstractConnector.java

index 349fef719485b3ff2b1325ce06742ad2484c8612..ca771cab3922cbdb8c776eadfe2eacff6a925916 100644 (file)
@@ -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");
index 7d707291476faf549a4687e37dc7012cda02c8c6..acf525bffba8cce0b663d2e24318b5da7cc8288f 100644 (file)
@@ -37,7 +37,7 @@ public abstract class AbstractComponentContainerConnector extends
 
     List<ComponentConnector> children;
 
-    private boolean debugLogging = false;
+    private final boolean debugLogging = false;
 
     /**
      * Default constructor
index 9b323992713f1385ddad4509324dafde0576086b..12e19b2a7023fc2e518637fc5411f7ae13a14035 100644 (file)
@@ -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));
+        }
 
     }
 }