Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT Logger: No control over debug output?

Tags:

java

logging

gwt

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

like image 666
Stefan Falk Avatar asked Sep 07 '15 11:09

Stefan Falk


1 Answers

Add this to your module.gwt.xml:

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

enter image description here

like image 92
Adam Avatar answered Oct 13 '22 23:10

Adam