GWT日志文件部署时 [英] GWT log file when deployed

查看:156
本文介绍了GWT日志文件部署时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 GWT web应用程序项目,我将它部署到 Tomcat 。在部署它之前,我想设置一个日志文件,这样我可以跟踪一些错误发生,如 JavaScriptException 。我怎么能做到这一点?



正如我做了一些研究,我读过GWT的默认日志记录不会模拟 FileHandler ,它允许我将我的日志文件写入特定文件。然后从一些关于日志记录的论坛上,有人一直使用 log4j ,但 log4j 用于 Java (我是对吗?)。

我该如何为我的 GWT 您可以使用 doc / latest / DevGuideLoggingrel =nofollow>内置GWT的日志功能。尤其是,您将主要对远程日志记录感兴趣,它会发送在RPC调用中记录客户端上的消息到服务器(显然你只是想在特殊情况下使用这个消息)。



你也可以使用 gwt-log 项目,并考虑使用 RemoteLogger


i have a GWT web application project and i will deploy it to Tomcat. before deploying it, i want to set a log file so that i can trace if some errors occur like JavaScriptException. how can i do this?

as i did some research, i've read that GWT's default logging does not emulate the FileHandler that allow me write my log file to a specific file. Then from some forums about logging, someone has been using log4j but log4j is for Java (am i right?).

how can i do the logging for my GWT app?

解决方案

You can use the built in logging capabilities of GWT. In particular you will be mostly interested in remote logging, which sends log messages logged on the client to the server in an RPC call (obviously you only want to use this in exceptional circumstances).

You can also use the gwt-log project and consider using the RemoteLogger.

这篇关于GWT日志文件部署时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆