Setup a remoteLoggingServlet in GWT

前端 未结 2 1010
伪装坚强ぢ
伪装坚强ぢ 2020-12-29 03:05

From http://code.google.com/intl/es-ES/webtoolkit/doc/latest/DevGuideLogging.html under the remote logging section it says that you need to

You will

2条回答
  •  臣服心动
    2020-12-29 03:42

    I found this blog post very helpful:

    https://vegdave.wordpress.com/2013/02/26/howto-setup-gwt-remote-logging/

    App.gwt.xml:

    
    
    
    
    
    
    

    web.xml:

    
    remoteLogging
    com.google.gwt.logging.server.RemoteLoggingServiceImpl
    
    
    remoteLogging
    /YOUR_MODULE/remote_logging
    
    

    In GWT:

    import com.google.gwt.logging.client.SimpleRemoteLogHandler;
    import java.util.logging.Level;
    import java.util.logging.LogRecord;
    
    SimpleRemoteLogHandler remoteLog = new SimpleRemoteLogHandler();
    remoteLog.publish(new LogRecord(Level.INFO, “log message”));
    

提交回复
热议问题