Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java GWT remoteLoggingServlet - can I configure java.util.Logging to send this to a log file?

Is it possible to get messages received on the server, from client side logging via the remoteLoggingServlet in GWT to write to a file?

http://code.google.com/intl/es-ES/webtoolkit/doc/latest/DevGuideLogging.html#Remote_Logging

I have GWT Logging set up successfully in my .gwt.xml

<set-property name="gwt.logging.enabled" value="TRUE"/>
<set-property name="gwt.logging.logLevel" value="FINE"/>

<set-property name="gwt.logging.popupHandler" value="DISABLED" />
<set-property name="gwt.logging.firebugHandler" value="DISABLED" />
<set-property name="gwt.logging.developmentModeHandler" value="DISABLED" />
<set-property name="gwt.logging.consoleHandler" value="DISABLED" />
<set-property name="gwt.logging.systemHandler" value="DISABLED" />
<set-property name="gwt.logging.simpleRemoteHandler" value="ENABLED"/>

And the remote logging servlet set up:

<servlet>
  <servlet-name>remoteLoggingServlet</servlet-name>
  <servlet-class>com.google.gwt.logging.server.RemoteLoggingServiceImpl</servlet-class>
</servlet>

<servlet-mapping>
  <servlet-name>remoteLoggingServlet</servlet-name>
  <url-pattern>/my.app.class.name/remote_logging</url-pattern>
</servlet-mapping>

I see my error messages on the development console.

I had hoped since the remote logging service

http://www.google.com/codesearch#A1edwVHBClQ/user/src/com/google/gwt/logging/server/RemoteLoggingServiceUtil.java&is_navigation=1

appears to use java.util.Logging under the covers, that I would be able to configure this to log to a log file, so that I could see what errors users were getting on the client side, to diagnose some performance problems.

Has anyone had any luck configuring messages to go somewhere other than client side displays?

like image 420
Chris Lalande Avatar asked Dec 31 '25 20:12

Chris Lalande


1 Answers

For what it's worth - I have decided to work around this by reimplementing my own RemoteLoggingServiceImpl and RemoteLoggingServiceUtil

And switching these from using java.util.Logging to using Log4j once the messages are on the server side.

like image 110
Chris Lalande Avatar answered Jan 02 '26 11:01

Chris Lalande



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!