Logging GWT with Tomcat

255 views
Skip to first unread message

Javier Rubio

unread,
May 12, 2015, 10:15:07 AM5/12/15
to google-we...@googlegroups.com
Hello,

Im just beginning to use GWT and Tomcat and I have a question about logging. Perhaps you can help me

Snippet from my XML file:

  <inherits name="com.google.gwt.logging.Logging"/>
  <set-property name="gwt.logging.logLevel" value="SEVERE"/>      
  <set-property name="gwt.logging.enabled" value="TRUE"/>
  <set-property name="gwt.logging.popupHandler" value="DISABLED" />

In my Java Code I have something like that:

   public Logger logger = Logger.getLogger("API-Logger");
   logger.log(Level.INFO,"Info Logging ");


When I check the Tomcat logs I can for example found info logging in the catalina log

What Im doing wrong if I want only to print the errors?

Thanks in advanced

Javier


Jens

unread,
May 12, 2015, 10:54:51 AM5/12/15
to google-we...@googlegroups.com
Logging in GWT and logging on Tomcat are two different things each having their own configuration.

When you configure logging in your *.gwt.xml file then its for logging inside the web browser (e.g. the browser console). This configuration has no impact on how Tomcat does logging on server side. Read the Tomcat docs to figure out how to change the logging behavior of Tomcat.

-- J.

Stefan Bylund

unread,
May 13, 2015, 3:29:05 AM5/13/15
to google-we...@googlegroups.com

Section 4 "Log exceptions on the server" in this blog post describes how to log client events on the server. This example talks about using GWT-RPC for remote logging but it's quite easy to implement custom remote logging using JSON or whatever.

Reply all
Reply to author
Forward
0 new messages