gpt4 book ai didi

gwt - 如何在 GWT 中打印到控制台

转载 作者:行者123 更新时间:2023-12-02 11:31:17 25 4
gpt4 key购买 nike

我正在调试 GWT 应用程序,我需要将一些内容打印到控制台以进行测试。 System.out.printlnGWT.log 不起作用。有人有什么想法吗?

最佳答案

引用文档:

Adding GWT logging is really quite simple, as simple as the following code example. However — understanding how logging works, and how to correctly configure it is important, so please do take the time to read the rest of this document.

http://code.google.com/webtoolkit/doc/latest/DevGuideLogging.html

启用日志记录的最简单方法是:

# In your .gwt.xml file
<inherits name="com.google.gwt.logging.Logging"/>

# In your .java file
Logger logger = java.util.logging.Logger.getLogger("NameOfYourLogger");
logger.log(Level.SEVERE, "this message should get logged");

关于gwt - 如何在 GWT 中打印到控制台,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9247424/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com