Monday, November 24, 2014

Re: GWT 2.7.0 and logging

Logging level effected by different configuration properties and unfortunately it is not very intuitive.

1. gwt.logging.enabled: This is the main valve that controls the logging level and it changes the logging level at "compile-time" to remove unnecessary code. i.e. it set to SEVERE it will prune the code related to any level below SEVERE.

2- gwt.logging.logLevel and ?logLevel=<new log level> both sets the logging level at "run-time". Meaning that' given gwt.logging.enabled set to "TRUE", it can configure the logging level dynamically.

We changed the gwt.logging.enabled to TRUE for super-dev-mode and set it to SEVERE for regular compile so you will see all the logging at the development time and however you production release will only keep the code for SEVERE log messages.

On Mon, Nov 24, 2014 at 1:52 AM, Thomas Broyer <t.broyer@gmail.com> wrote:
[+cc goktug]

The gwt.logging.enabled property is now SEVERE by default (rather than TRUE previously), which compiles out every logging below level SEVERE.
You have to set gwt.logging.enabled to TRUE to be able to log at INFO level. AFAICT, gwt.logging.logLevel only sets the default log level, that can be overridden from the query-string.

On Monday, November 24, 2014 10:11:53 AM UTC+1, Lorenzo Sarti wrote:
Hi all,
I've just tried GWT 2.7.0. My app inherits com.google.gwt.logging.Logging and I've some problems to understand the new behavior of the logging module. I read in the Library Changes Section of the 2.7.0 Release Notes that
"The new default is to log messages at level SEVERE and above to the browser's console".
However, whether I try to set the log level from the url (?logLevel=<new log level>) or from the .gwt.xml file (<set-property name="gwt.logging.logLevel" value="<new log level>" />) the log level is not changed and the logging is performed at SEVERE level.
Moreover, debugging the com.google.gwt.logging.client.LogConfiguration.class and its method setLevels, the strange behavior is confirmed. If a log level is found in the URL then the level is set (the statement l.setLevel(level) is executed but the logging continues to be executed at severe level) but if a log level is not found in the URL the default level is set and the content of the .gwt.xml file seems to be ignored.
I wonder where I am going wrong. The logging of my app works with GWT <= 2.6.1.
Any help will be appreciated.
Best,
Lorenzo


--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment