Revision: 10320
Author:   [email protected]
Date:     Fri Jun 10 11:47:48 2011
Log: Fixes a problem where inheriting LoggingDisabled (like RequestFactory does) clobbers the value of gwt.logging.enabled for downstream modules. Without this change RequestFactory apps were forced to set gwt.logging.enabled themselves, instead of just inheriting Logging.gwt.xml

Review at http://gwt-code-reviews.appspot.com/1451816

Review by: [email protected]
http://code.google.com/p/google-web-toolkit/source/detail?r=10320

Modified:
/trunk/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/MobileWebApp.gwt.xml
 /trunk/user/src/com/google/gwt/logging/Logging.gwt.xml
 /trunk/user/src/com/google/gwt/logging/LoggingDisabled.gwt.xml

=======================================
--- /trunk/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/MobileWebApp.gwt.xml Wed Jun 1 09:26:16 2011 +++ /trunk/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/MobileWebApp.gwt.xml Fri Jun 10 11:47:48 2011
@@ -8,6 +8,12 @@
   <inherits name='com.google.gwt.editor.Editor'/>
   <inherits name='com.google.gwt.sample.mobilewebapp.FormFactor'/>
   <inherits name='com.google.web.bindery.requestfactory.RequestFactory'/>
+
+  <!-- Use GWT's java.util.logging emulation -->
+  <inherits name="com.google.gwt.logging.Logging"/>
+  <!-- Turn off the popup log handler, which is on by default to make sure
+       people are very aware that they are including the logging code -->
+  <set-property name="gwt.logging.popupHandler" value="DISABLED" />

   <inherits name='com.google.gwt.sample.gaerequest.GaeRequest'/>
   <inherits name='com.google.gwt.sample.core.Core'/>
=======================================
--- /trunk/user/src/com/google/gwt/logging/Logging.gwt.xml Wed Jun 8 16:44:32 2011 +++ /trunk/user/src/com/google/gwt/logging/Logging.gwt.xml Fri Jun 10 11:47:48 2011
@@ -13,125 +13,6 @@
<!-- limitations under the License. -->

 <module>
-  <inherits name="com.google.gwt.json.JSON"/>
-  <inherits name="com.google.gwt.user.User" />
-  <inherits name="com.google.gwt.logging.LogImpl"/>
-  <source path="client" />
-  <source path="shared" />
-
- <replace-with class="com.google.gwt.logging.client.LogConfiguration.LogConfigurationImplRegular"> - <when-type-is class="com.google.gwt.logging.client.LogConfiguration.LogConfigurationImplNull"/>
-    <when-property-is name="gwt.logging.enabled" value="TRUE" />
-  </replace-with>
-
-
-  <!-- Set up and handle the gwt.logging.logLevel property -->
- <define-property name="gwt.logging.logLevel" values="ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE" />
-  <replace-with class="com.google.gwt.logging.client.DefaultLevel.All">
-    <when-type-is class="com.google.gwt.logging.client.DefaultLevel" />
-    <when-property-is name="gwt.logging.logLevel" value="ALL" />
-  </replace-with>
-  <replace-with class="com.google.gwt.logging.client.DefaultLevel.Finest">
-    <when-type-is class="com.google.gwt.logging.client.DefaultLevel" />
-    <when-property-is name="gwt.logging.logLevel" value="FINEST" />
-  </replace-with>
-  <replace-with class="com.google.gwt.logging.client.DefaultLevel.Finer">
-    <when-type-is class="com.google.gwt.logging.client.DefaultLevel" />
-    <when-property-is name="gwt.logging.logLevel" value="FINER" />
-  </replace-with>
-  <replace-with class="com.google.gwt.logging.client.DefaultLevel.Fine">
-    <when-type-is class="com.google.gwt.logging.client.DefaultLevel" />
-    <when-property-is name="gwt.logging.logLevel" value="FINE" />
-  </replace-with>
-  <replace-with class="com.google.gwt.logging.client.DefaultLevel.Config">
-    <when-type-is class="com.google.gwt.logging.client.DefaultLevel" />
-    <when-property-is name="gwt.logging.logLevel" value="CONFIG" />
-  </replace-with>
-  <replace-with class="com.google.gwt.logging.client.DefaultLevel.Info">
-    <when-type-is class="com.google.gwt.logging.client.DefaultLevel" />
-    <when-property-is name="gwt.logging.logLevel" value="INFO" />
-  </replace-with>
-  <replace-with class="com.google.gwt.logging.client.DefaultLevel.Warning">
-    <when-type-is class="com.google.gwt.logging.client.DefaultLevel" />
-    <when-property-is name="gwt.logging.logLevel" value="WARNING" />
-  </replace-with>
-  <replace-with class="com.google.gwt.logging.client.DefaultLevel.Severe">
-    <when-type-is class="com.google.gwt.logging.client.DefaultLevel" />
-    <when-property-is name="gwt.logging.logLevel" value="SEVERE" />
-  </replace-with>
-
-
-  <!-- Set up and handle the gwt.logging.xxxHandler properties -->
- <define-property name="gwt.logging.consoleHandler" values="ENABLED, DISABLED" />
-  <replace-with class="com.google.gwt.logging.client.NullLogHandler">
- <when-type-is class="com.google.gwt.logging.client.ConsoleLogHandler" />
-    <any>
-      <when-property-is name="gwt.logging.enabled" value="FALSE" />
- <when-property-is name="gwt.logging.consoleHandler" value="DISABLED" />
-    </any>
-  </replace-with>
- <define-property name="gwt.logging.developmentModeHandler" values="ENABLED, DISABLED" />
-  <replace-with class="com.google.gwt.logging.client.NullLogHandler">
- <when-type-is class="com.google.gwt.logging.client.DevelopmentModeLogHandler" />
-    <any>
-      <when-property-is name="gwt.logging.enabled" value="FALSE" />
- <when-property-is name="gwt.logging.developmentModeHandler" value="DISABLED" />
-    </any>
-  </replace-with>
- <define-property name="gwt.logging.firebugHandler" values="ENABLED, DISABLED" />
-  <replace-with class="com.google.gwt.logging.client.NullLogHandler">
- <when-type-is class="com.google.gwt.logging.client.FirebugLogHandler" />
-    <any>
-      <when-property-is name="gwt.logging.enabled" value="FALSE" />
- <when-property-is name="gwt.logging.firebugHandler" value="DISABLED" />
-    </any>
-  </replace-with>
- <define-property name="gwt.logging.systemHandler" values="ENABLED, DISABLED" />
-  <replace-with class="com.google.gwt.logging.client.NullLogHandler">
-    <when-type-is class="com.google.gwt.logging.client.SystemLogHandler" />
-    <any>
-      <when-property-is name="gwt.logging.enabled" value="FALSE" />
- <when-property-is name="gwt.logging.systemHandler" value="DISABLED" />
-    </any>
-  </replace-with>
- <define-property name="gwt.logging.simpleRemoteHandler" values="ENABLED, DISABLED" />
-  <replace-with class="com.google.gwt.logging.client.NullLogHandler">
- <when-type-is class="com.google.gwt.logging.client.SimpleRemoteLogHandler" />
-    <any>
-      <when-property-is name="gwt.logging.enabled" value="FALSE" />
- <when-property-is name="gwt.logging.simpleRemoteHandler" value="DISABLED" />
-    </any>
-  </replace-with>
- <define-property name="gwt.logging.hasWidgetsHandler" values="ENABLED, DISABLED" />
-  <replace-with class="com.google.gwt.logging.client.NullLogHandler">
- <when-type-is class="com.google.gwt.logging.client.HasWidgetsLogHandler" />
-    <any>
-      <when-property-is name="gwt.logging.enabled" value="FALSE" />
- <when-property-is name="gwt.logging.hasWidgetsHandler" value="DISABLED" />
-    </any>
-  </replace-with>
-
-
- <define-property name="gwt.logging.popupHandler" values="ENABLED, DISABLED" />
-  <replace-with class="com.google.gwt.logging.client.NullLoggingPopup">
-    <when-type-is class="com.google.gwt.logging.client.LoggingPopup" />
-    <any>
-      <when-property-is name="gwt.logging.enabled" value="FALSE" />
-      <when-property-is name="gwt.logging.popupHandler" value="DISABLED" />
-    </any>
-  </replace-with>
-
-
-  <!-- Default values for all properties -->
+  <inherits name="com.google.gwt.logging.LoggingDisabled"/>
   <set-property name="gwt.logging.enabled" value="TRUE"/>
-  <set-property name="gwt.logging.logLevel" value="INFO"/>
-  <set-property name="gwt.logging.consoleHandler" value="ENABLED" />
- <set-property name="gwt.logging.developmentModeHandler" value="ENABLED" />
-  <set-property name="gwt.logging.firebugHandler" value="ENABLED" />
-  <set-property name="gwt.logging.hasWidgetsHandler" value="ENABLED" />
-  <set-property name="gwt.logging.popupHandler" value="ENABLED" />
-  <set-property name="gwt.logging.systemHandler" value="ENABLED" />
-  <set-property name="gwt.logging.simpleRemoteHandler" value="DISABLED" />
-
-  <entry-point class="com.google.gwt.logging.client.LogConfiguration"/>
 </module>
=======================================
--- /trunk/user/src/com/google/gwt/logging/LoggingDisabled.gwt.xml Thu Sep 23 05:32:15 2010 +++ /trunk/user/src/com/google/gwt/logging/LoggingDisabled.gwt.xml Fri Jun 10 11:47:48 2011
@@ -12,12 +12,125 @@
<!-- implied. License for the specific language governing permissions and --> <!-- limitations under the License. -->

-
-<!-- Leaving out the inheritance of gwt.logging.Logging is enough to
-     disable logging, but some projects need the classes to be available to
-     avoid compile errors, even if they are disabling logging.  Inheriting
-     this module will work for those projects. -->
 <module>
-  <inherits name="com.google.gwt.logging.Logging"/>
-  <set-property name="gwt.logging.enabled" value="FALSE"/>
+  <inherits name="com.google.gwt.json.JSON"/>
+  <inherits name="com.google.gwt.user.User" />
+  <inherits name="com.google.gwt.logging.LogImpl"/>
+  <source path="client" />
+  <source path="shared" />
+
+ <replace-with class="com.google.gwt.logging.client.LogConfiguration.LogConfigurationImplRegular"> + <when-type-is class="com.google.gwt.logging.client.LogConfiguration.LogConfigurationImplNull"/>
+    <when-property-is name="gwt.logging.enabled" value="TRUE" />
+  </replace-with>
+
+
+  <!-- Set up and handle the gwt.logging.logLevel property -->
+ <define-property name="gwt.logging.logLevel" values="ALL, FINEST, FINER, FINE, CONFIG, INFO, WARNING, SEVERE" />
+  <replace-with class="com.google.gwt.logging.client.DefaultLevel.All">
+    <when-type-is class="com.google.gwt.logging.client.DefaultLevel" />
+    <when-property-is name="gwt.logging.logLevel" value="ALL" />
+  </replace-with>
+  <replace-with class="com.google.gwt.logging.client.DefaultLevel.Finest">
+    <when-type-is class="com.google.gwt.logging.client.DefaultLevel" />
+    <when-property-is name="gwt.logging.logLevel" value="FINEST" />
+  </replace-with>
+  <replace-with class="com.google.gwt.logging.client.DefaultLevel.Finer">
+    <when-type-is class="com.google.gwt.logging.client.DefaultLevel" />
+    <when-property-is name="gwt.logging.logLevel" value="FINER" />
+  </replace-with>
+  <replace-with class="com.google.gwt.logging.client.DefaultLevel.Fine">
+    <when-type-is class="com.google.gwt.logging.client.DefaultLevel" />
+    <when-property-is name="gwt.logging.logLevel" value="FINE" />
+  </replace-with>
+  <replace-with class="com.google.gwt.logging.client.DefaultLevel.Config">
+    <when-type-is class="com.google.gwt.logging.client.DefaultLevel" />
+    <when-property-is name="gwt.logging.logLevel" value="CONFIG" />
+  </replace-with>
+  <replace-with class="com.google.gwt.logging.client.DefaultLevel.Info">
+    <when-type-is class="com.google.gwt.logging.client.DefaultLevel" />
+    <when-property-is name="gwt.logging.logLevel" value="INFO" />
+  </replace-with>
+  <replace-with class="com.google.gwt.logging.client.DefaultLevel.Warning">
+    <when-type-is class="com.google.gwt.logging.client.DefaultLevel" />
+    <when-property-is name="gwt.logging.logLevel" value="WARNING" />
+  </replace-with>
+  <replace-with class="com.google.gwt.logging.client.DefaultLevel.Severe">
+    <when-type-is class="com.google.gwt.logging.client.DefaultLevel" />
+    <when-property-is name="gwt.logging.logLevel" value="SEVERE" />
+  </replace-with>
+
+
+  <!-- Set up and handle the gwt.logging.xxxHandler properties -->
+ <define-property name="gwt.logging.consoleHandler" values="ENABLED, DISABLED" />
+  <replace-with class="com.google.gwt.logging.client.NullLogHandler">
+ <when-type-is class="com.google.gwt.logging.client.ConsoleLogHandler" />
+    <any>
+      <when-property-is name="gwt.logging.enabled" value="FALSE" />
+ <when-property-is name="gwt.logging.consoleHandler" value="DISABLED" />
+    </any>
+  </replace-with>
+ <define-property name="gwt.logging.developmentModeHandler" values="ENABLED, DISABLED" />
+  <replace-with class="com.google.gwt.logging.client.NullLogHandler">
+ <when-type-is class="com.google.gwt.logging.client.DevelopmentModeLogHandler" />
+    <any>
+      <when-property-is name="gwt.logging.enabled" value="FALSE" />
+ <when-property-is name="gwt.logging.developmentModeHandler" value="DISABLED" />
+    </any>
+  </replace-with>
+ <define-property name="gwt.logging.firebugHandler" values="ENABLED, DISABLED" />
+  <replace-with class="com.google.gwt.logging.client.NullLogHandler">
+ <when-type-is class="com.google.gwt.logging.client.FirebugLogHandler" />
+    <any>
+      <when-property-is name="gwt.logging.enabled" value="FALSE" />
+ <when-property-is name="gwt.logging.firebugHandler" value="DISABLED" />
+    </any>
+  </replace-with>
+ <define-property name="gwt.logging.systemHandler" values="ENABLED, DISABLED" />
+  <replace-with class="com.google.gwt.logging.client.NullLogHandler">
+    <when-type-is class="com.google.gwt.logging.client.SystemLogHandler" />
+    <any>
+      <when-property-is name="gwt.logging.enabled" value="FALSE" />
+ <when-property-is name="gwt.logging.systemHandler" value="DISABLED" />
+    </any>
+  </replace-with>
+ <define-property name="gwt.logging.simpleRemoteHandler" values="ENABLED, DISABLED" />
+  <replace-with class="com.google.gwt.logging.client.NullLogHandler">
+ <when-type-is class="com.google.gwt.logging.client.SimpleRemoteLogHandler" />
+    <any>
+      <when-property-is name="gwt.logging.enabled" value="FALSE" />
+ <when-property-is name="gwt.logging.simpleRemoteHandler" value="DISABLED" />
+    </any>
+  </replace-with>
+ <define-property name="gwt.logging.hasWidgetsHandler" values="ENABLED, DISABLED" />
+  <replace-with class="com.google.gwt.logging.client.NullLogHandler">
+ <when-type-is class="com.google.gwt.logging.client.HasWidgetsLogHandler" />
+    <any>
+      <when-property-is name="gwt.logging.enabled" value="FALSE" />
+ <when-property-is name="gwt.logging.hasWidgetsHandler" value="DISABLED" />
+    </any>
+  </replace-with>
+
+
+ <define-property name="gwt.logging.popupHandler" values="ENABLED, DISABLED" />
+  <replace-with class="com.google.gwt.logging.client.NullLoggingPopup">
+    <when-type-is class="com.google.gwt.logging.client.LoggingPopup" />
+    <any>
+      <when-property-is name="gwt.logging.enabled" value="FALSE" />
+      <when-property-is name="gwt.logging.popupHandler" value="DISABLED" />
+    </any>
+  </replace-with>
+
+
+  <!-- Default values for all properties -->
+  <set-property name="gwt.logging.logLevel" value="INFO"/>
+  <set-property name="gwt.logging.consoleHandler" value="ENABLED" />
+ <set-property name="gwt.logging.developmentModeHandler" value="ENABLED" />
+  <set-property name="gwt.logging.firebugHandler" value="ENABLED" />
+  <set-property name="gwt.logging.hasWidgetsHandler" value="ENABLED" />
+  <set-property name="gwt.logging.popupHandler" value="ENABLED" />
+  <set-property name="gwt.logging.systemHandler" value="ENABLED" />
+  <set-property name="gwt.logging.simpleRemoteHandler" value="DISABLED" />
+
+  <entry-point class="com.google.gwt.logging.client.LogConfiguration"/>
 </module>

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to