开发者

GWT Clientsided logging without RPC

I just read the Developer's Guide - Logging and it says that the client-sided loggi开发者_高级运维ng implement throw RPC calls (see Remote Logging ).

My application doesn't use RPC and it is supposed to be hosted on a webserver which doesn't have Java support (so now RPC usable). Is there still a possibility to use the GWT logger on the client?


Just a quick example of gwt-log below..

Add this line in *.gwt.xml file. Its in parent package of your client side source. The top most package..

<inherits name="com.google.gwt.logging.Logging"/>

Add this in .java file, lets say in the onModuleLoad() method

public void onModuleLoad() {
  Logger logger = Logger.getLogger("NameOfYourLogger");
    logger.log(Level.SEVERE, "this message should get logged");


You can try another logger....see here: http://code.google.com/p/gwt-log/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜