本文介绍了为什么SuperDevMode只提供LogLevel SEVERE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用GWT 2.7并希望在我的应用程序中提供Level INFO和WARNUNG的日志记录。在我的gwt.xml文件中,我有:

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

它在Dev模式下工作得很完美,但是在SuperDevMode中,我只获取日志级别的SEVERE进行记录。 p>

为什么SuperDevMode只提供LogLevel SEVERE?

解决方案

我刚刚检查了一个我的应用程序(使用GXT),在那里我看到日志消息:


我在模块描述符中使用下面这行代码:

 <! -  values are:severe,warning,info,config,fine,finer,finest  - > 
< set-property name =gwt.logging.enabledvalue =TRUE/>
<! - 请注意,这些是默认值,所以我们实际上并不需要列出它们 - >
< set-property name =gwt.logging.developmentModeHandlervalue =ENABLED/>

< set-property name =gwt.logging.simpleRemoteHandlervalue =DISABLED/>
< set-property name =gxt.logging.enabledvalue =true/>

并将此代码添加到我的演示者:

  private static final Logger logger = logger.getLogger(ShellPresenter.class.getName()); 

logger.log(Level.INFO,启动模块爱马仕);

我没花时间找出哪个配置启用日志记录,也不知道它是否相关到GXT。

以及其他一些信息:


I use GWT 2.7 and want to provide logging with Level INFO and WARNUNG in my app. In my gwt.xml file I have:

<inherits name="com.google.gwt.logging.Logging"/> 
<set-property name="gwt.logging.logLevel" value="INFO"/>

It works perfect in Dev mode but in SuperDevMode I only get Log level SEVERE to be logged.

Why does SuperDevMode only provides LogLevel SEVERE?

解决方案

I just checked one of my applications (which uses GXT) and there I see the log message:

I use this lines inside my module descriptor:

 <!-- values are:  severe, warning, info, config, fine, finer, finest -->
 <set-property name="gwt.logging.logLevel" value="INFO"/>
 <set-property name="gwt.logging.enabled" value="TRUE" />
 <!-- Write messages to browser consoles and to the jvm and dev mode -->
 <!-- Note that these are the defaults, so we don’t actually need to list them -->
 <set-property name="gwt.logging.consoleHandler" value="ENABLED"/>
 <set-property name="gwt.logging.developmentModeHandler" value="ENABLED"/>
 <set-property name="gwt.logging.systemHandler" value="ENABLED"/>
 <!-- Leave RPC logging disabled, as we aren’t setting that up in this example -->
 <set-property name="gwt.logging.simpleRemoteHandler" value="DISABLED"/>
 <!-- Ask GXT to log all internal details -->
 <set-property name="gxt.logging.enabled" value="true"/>

and add this code to my presenter:

private static final Logger logger = logger.getLogger(ShellPresenter.class.getName());

logger.log(Level.INFO, "Starting module Hermes");

I don't spent time to find out which one of the configurations enables logging nor if it is related to GXT.

And some more informations:

groups.google.com/forum/#!topic/google-web-toolkit/BRZNt1_qEjg

这篇关于为什么SuperDevMode只提供LogLevel SEVERE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-18 20:34