Remove redundant isLoggable check. It's always level ALL

Looks like the java logger does not reflect the log4j level settings

:(
This commit is contained in:
games647 2016-06-01 18:28:22 +02:00
parent 351fe3aa5a
commit 71a9abdad9

View File

@ -69,12 +69,10 @@ public final class ConsoleLogger {
public static void debug(String message) {
if (enableDebug) {
if (logger.isLoggable(Level.FINE)) {
//creating and filling an exception is a expensive call
//->so it should be removed as soon #418 is fixed
//logger.isLoggable does not work because the plugin logger is always ALL
logger.log(Level.FINE, message + ' ' + Thread.currentThread().getName(), new Exception());
} else {
logger.log(Level.FINE, "{0} {1}", new Object[]{message, Thread.currentThread().getName()});
}
if (useLogging) {
writeLog("Debug: " + Thread.currentThread().getName() + ':' + message);