mirror of
https://github.com/AuthMe/AuthMeReloaded.git
synced 2024-09-07 12:48:03 +02:00
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:
parent
351fe3aa5a
commit
71a9abdad9
@ -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
|
||||
logger.log(Level.FINE, message + ' ' + Thread.currentThread().getName(), new Exception());
|
||||
} else {
|
||||
logger.log(Level.FINE, "{0} {1}", new Object[]{message, Thread.currentThread().getName()});
|
||||
}
|
||||
//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());
|
||||
|
||||
if (useLogging) {
|
||||
writeLog("Debug: " + Thread.currentThread().getName() + ':' + message);
|
||||
|
Loading…
Reference in New Issue
Block a user