gwt /
gwt /
6e8d9a28e424c08d3b55ecb086f547363c6b2019 Add an option to compile out all logging calls below the SEVERE or WARNING
level. Note that this does not work for logger.log() calls - it only works for
logger.severe(), logger.info(), etc. style calls. Since the java.util.logging API does not provide the ability to log exceptions with the logger.severe() style calls, you'll need to use the logger.log() calls to log exceptions and follow the directions below for how to get them to compile out.
If you need to compile out logger.log() calls (or any more complex logging code), you can do this:
if (LogConfiguration.loggingIsEnabled(Level.WARNING)) {
// This will all compile out if gwt.logging.enabled is set to SEVERE
String errMessage = "Hi";
logger.log(Level.WARNING, errMessage, exception);
}
Review by: cromwellian@google.com
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10753 8db76d5a-ed1c-0410-87a9-c151d255dfc7
11 files changed