Memo‎ > ‎

Logging in GWT

posted May 15, 2013, 1:45 PM by Teng-Yok Lee
Here is my procedure to enable GWT logging to Firebug (also worked for Chrome) without the popup panel.

References:
  1. Developer's Guide - Logging, https://developers.google.com/web-toolkit/doc/latest/DevGuideLogging.
  2. GWT logging setup, http://stackoverflow.com/questions/4804336/gwt-logging-setup

Add the following line to .gwt.xml
<inherits name="com.google.gwt.logging.Logging"/>

To enable the logging to Firebug, add the following lines:
<set-property name="gwt.logging.firebugHandler" value="ENABLED" />

To disable the popup panel:
<set-property name="gwt.logging.popupHandler" value="DISABLED" />
Then in the Java code, we just write the code as follows:
import java.util.logging.Level; import java.util.logging.Logger;

...

Logger logger = Logger.getLogger("DescribeRun");

logger.log(Level.SEVERE, "this message should get logged");

Comments