Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to configure class specific log level in GWT logging?

Tags:

logging

gwt

When using java.util.logging, the log level for a specific class (i.e. for a child logger with the name of the class) can be configured in the logging.properties file as so:

com.foobar.MyClass.level = FINE

I create the child logger in MyClass using the class name as follows:

private static Logger log = Logger.getLogger(MyClass.class.getName());

The parent logger's log level is set at SEVERE. This causes FINE level logging only for MyClass to be logged, with SEVERE level logging happening everywhere else.

Is there a way to configure this similarly in the Google Web Toolkit gwt.xml file?

like image 780
CBass Avatar asked Jun 17 '12 00:06

CBass


1 Answers

Unfortunately, no. GWT Logging support is limited in that you can only set the log level at the module level. I would love to see better control over logging in future releases, but AFAIK, there aren't any serious plans to expand such support.

like image 128
Chris Cashwell Avatar answered Oct 12 '22 11:10

Chris Cashwell