GWT Client Side Loggers

Is there a way to report log messages in GWT client applications for development purposes (in standard GWT libraries, i.e. no external libraries)?

i.e. like Logger , which can be used to display log messages on catalina.out when developing things, for example, for Tomcat.

+6
logging gwt
source share
2 answers

Take a look at the gwt-log project. It seems that you are looking.

http://code.google.com/p/gwt-log/

+7
source share

Just a quick example.

Add this line to the * .gwt.xml file. Its in the parent package of your client source. The topmost package.

<inherits name="com.google.gwt.logging.Logging"/> 

Add this to the .java file, say in the onModuleLoad () method

 public void onModuleLoad() { Logger logger = Logger.getLogger("NameOfYourLogger"); logger.log(Level.SEVERE, "this message should get logged"); 
+3
source share

All Articles