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: unnurg@google.com
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10320 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/MobileWebApp.gwt.xml b/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/MobileWebApp.gwt.xml
index b80b9b6..da6dd17 100644
--- a/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/MobileWebApp.gwt.xml
+++ b/samples/mobilewebapp/src/main/java/com/google/gwt/sample/mobilewebapp/MobileWebApp.gwt.xml
@@ -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'/>
diff --git a/user/src/com/google/gwt/logging/Logging.gwt.xml b/user/src/com/google/gwt/logging/Logging.gwt.xml
index 6989f1b..23726cc 100644
--- a/user/src/com/google/gwt/logging/Logging.gwt.xml
+++ b/user/src/com/google/gwt/logging/Logging.gwt.xml
@@ -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>
\ No newline at end of file
diff --git a/user/src/com/google/gwt/logging/LoggingDisabled.gwt.xml b/user/src/com/google/gwt/logging/LoggingDisabled.gwt.xml
index 6caf995..da3cf00 100644
--- a/user/src/com/google/gwt/logging/LoggingDisabled.gwt.xml
+++ b/user/src/com/google/gwt/logging/LoggingDisabled.gwt.xml
@@ -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>
\ No newline at end of file