GWT记录器:无法控制调试输出? [英] GWT Logger: No control over debug output?

查看:68
本文介绍了GWT记录器:无法控制调试输出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 client.gwt.xml 文件中包含以下内容:

 < ;?xml version =1.0encoding =UTF-8?> 
<!DOCTYPE module PUBLIC - // Google Inc. //DTD Google Web Toolkit 2.5.1 // ENhttp://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.logLevelvalue =FINER/>
< set-property name =gwt.logging.enabledvalue =TRUE/>

< / module>

并且我正在尝试记录下列内容:

  LOGGER.info(INFO); 
LOGGER.fine(FINE);
LOGGER.warning(WARNING);
LOGGER.severe(SEVERE);

但是我的萤火虫控制台中唯一显示的是SEVERE讯息:


  Mon Sep 07 13:44:09 GMT + 200 2015 com.mz.client.App 
SEVERE :SEVERE


为什么我没有收到其他日志消息? / p>




我已经设置了 java.util.logging.ConsoleHandler.level logging.properties FINE

 #将控制台上打印的消息限制为INFO及更高版本。 
java.util.logging.ConsoleHandler.level = FINE
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter




编辑:

现在,即使没有其中一行,它也能正常工作。

 <! - < set-property name =gwt。 logging.logLevelvalue =FINER/> - > 
<! - < set-property name =gwt.logging.enabledvalue =TRUE/> - >
<! - < set-property name =gwt.logging.consoleHandlervalue =ENABLED/> - >

我删除了这些行,清理了我的项目并启动了Apache服务器,无论我接受什么神奇的理由调试输出。



更改

 < set-property name = gwt.logging.logLevelvalue =FINER/> 

 < set-property name =gwt.logging.logLevelvalue =INFO/> 

不会改变输出。我将所有消息都收到 FINER 。设置

 < set-property name =gwt.logging.enabledvalue =FALSE/> 

现在不会删除调试输出。仍然得到一切。



我想控制我的调试输出。

解决方案



 < set- property name =gwt.logging.enabledvalue =TRUE/> 


I'm having the following in my client.gwt.xml file:

<?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>

and I'm trying to log the following:

    LOGGER.info("INFO");
    LOGGER.fine("FINE");
    LOGGER.warning("WARNING");
    LOGGER.severe("SEVERE");

but the only thing that shows up in my firebug console is the SEVERE message:

Mon Sep 07 13:44:09 GMT+200 2015 com.mz.client.App 
SEVERE: SEVERE

Why am I not getting the other log messages?


I have already set the java.util.logging.ConsoleHandler.level in logging.properties to 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


Edit:

Right now it is working even without one of those lines

<!--    <set-property name="gwt.logging.logLevel" value="FINER"/> -->
<!--    <set-property name="gwt.logging.enabled" value="TRUE"/>  -->
<!--    <set-property name="gwt.logging.consoleHandler" value="ENABLED"/> -->

I removed those lines, cleaned my project and launched the Apache server and for whatever magical reason I am receiving debug output.

Changing

<set-property name="gwt.logging.logLevel" value="FINER"/> 

to

<set-property name="gwt.logging.logLevel" value="INFO"/> 

does not change the output. I am getting all messages down to FINER. Setting

<set-property name="gwt.logging.enabled" value="FALSE"/> 

now does not remove the debug output. Still getting everything.

I want to have control over my debug output..

解决方案

Add this to your module.gwt.xml:

<set-property name="gwt.logging.enabled" value="TRUE" />

这篇关于GWT记录器:无法控制调试输出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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