Java GWT RemoteLoggingServlet - 我可以配置 java.util.Logging 将其发送到日志文件吗?
是否可以通过 GWT 中的 RemoteLoggingServlet 从客户端日志记录中获取服务器上收到的消息并写入文件?
http://code.google.com/intl /es-ES/webtoolkit/doc/latest/DevGuideLogging.html#Remote_Logging
我在 .gwt.xml 中成功设置了 GWT 日志记录
<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"/>
,并设置了远程日志记录 servlet 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>
我在开发控制台上看到错误消息。
自从远程日志记录服务
似乎使用 java。 util.Logging 在幕后,我可以将其配置为记录到日志文件,以便我可以看到用户在客户端遇到的错误,以诊断一些性能问题。
有没有人有幸将消息配置到客户端显示之外的其他地方?
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
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不管它的价值 - 我决定通过重新实现我自己的来解决这个问题
RemoteLoggingServiceImpl 和 RemoteLoggingServiceUtil
一旦消息到达服务器端,就将它们从使用 java.util.Logging 切换到使用 Log4j。
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.