GWT Logger: No control over debug output?

拈花ヽ惹草 提交于 2019-12-19 18:36:45

问题


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


回答1:


Add this to your module.gwt.xml:

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



来源:https://stackoverflow.com/questions/32438000/gwt-logger-no-control-over-debug-output

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!