In order for the log to work, you need to have the following:
The registration module is inherited in your module XML file:
<inherits name="com.google.gwt.logging.Logging" />
The level set record and handlers are configured:
<set-property name="gwt.logging.logLevel" value="FINE" /> <set-property name="gwt.logging.systemHandler" value="ENABLED" /> <set-property name="gwt.logging.consoleHandler" value="ENABLED" /> <set-property name="gwt.logging.developmentModeHandler" value="ENABLED" /> <set-property name="gwt.logging.popupHandler" value="DISABLED" /> <set-property name="gwt.logging.firebugHandler" value="DISABLED" /> <set-property name="gwt.logging.simpleRemoteHandler" value="DISABLED" />
You may need a different configuration of the handler than this, based on what you are trying to achieve, for more information check the white paper in this question .
Please note that my FINE level, which ensures that most of what you register, is not ignored by any handler, since FINE is one of the lowest levels. By default, loggers are configured to process only SEVERE level logs, which usually ignore the rest, with SEVERE being the highest level.
Then you need to make sure that the level you use for logging is enabled with the LEVEL setting that you set in the XML module file. For example, if you use ...
static final Logger logger= Logger.getLogger(MyClass.class.getName()); logger.fine("--MESSAGE--"); // or logger.log(Level.FINE, "--MESSAGE--");
... the level must be set to FINE or any other level below for these messages that you see in your journal, if you select any level above FINE, all these messages will be ignored.
Hope this helps ...
Chepech Aug 13 '13 at 18:56 2013-08-13 18:56
source share