我在client.gwt.xml文件中有以下内容:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC "-//Google Inc.//DTD Google Web Toolkit 2.5.1//EN" "http://gwtproject.org/doctype/2.7.0/gwt-module.dtd">
<module rename-to='client'>
<inherits name="com.mz.client.app" />
<source path="client"/>
<inherits name="com.google.gwt.logging.Logging"/>
<set-property name="gwt.logging.logLevel" value="FINER"/>
<set-property name="gwt.logging.enabled" value="TRUE"/>
<set-property name="gwt.logging.consoleHandler" value="ENABLED"/>
</module>
Run Code Online (Sandbox Code Playgroud)
我正在尝试记录以下内容:
LOGGER.info("INFO");
LOGGER.fine("FINE");
LOGGER.warning("WARNING");
LOGGER.severe("SEVERE");
Run Code Online (Sandbox Code Playgroud)
但是我的firebug控制台中唯一出现的是SEVERE消息:
Run Code Online (Sandbox Code Playgroud)Mon Sep 07 13:44:09 GMT+200 2015 com.mz.client.App SEVERE: SEVERE
为什么我没有收到其他日志消息?
我已经设置了java.util.logging.ConsoleHandler.level中logging.properties到FINE:
# Limit the message that are printed on the console to INFO and above.
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
Run Code Online (Sandbox Code Playgroud)
编辑:
现在,即使没有这些线路,它仍在工作 …