Fixed stuff and made core use mc 1.16 version of log4j

This commit is contained in:
coolGi2007
2022-04-04 18:49:45 +09:30
parent 02b0637adc
commit 8296b006b4
2 changed files with 6 additions and 6 deletions
@@ -45,8 +45,8 @@ public class ConfigBasedLogger {
if (mode.levelForFile.isLessSpecificThan(level)) {
Level logLevel = level.isLessSpecificThan(Level.INFO) ? Level.INFO : level;
if (param.length > 0 && param[param.length-1] instanceof Throwable)
logger.atLevel(logLevel).withLocation().withThrowable((Throwable)param[param.length-1]).log(msgStr);
else logger.atLevel(logLevel).withLocation().log(msgStr);
logger.log(logLevel, msgStr, (Throwable)param[param.length-1]);
else logger.log(logLevel, msgStr);
}
if (mode.levelForChat.isLessSpecificThan(level)) {
if (param.length > 0 && param[param.length-1] instanceof Throwable)
@@ -54,8 +54,8 @@ public class ConfigBasedSpamLogger {
if (mode.levelForFile.isLessSpecificThan(level)) {
Level logLevel = level.isLessSpecificThan(Level.INFO) ? Level.INFO : level;
if (param.length > 0 && param[param.length-1] instanceof Throwable)
logger.atLevel(logLevel).withLocation().withThrowable((Throwable)param[param.length-1]).log(msgStr);
else logger.atLevel(logLevel).withLocation().log(msgStr);
logger.log(logLevel, msgStr, (Throwable)param[param.length-1]);
else logger.log(logLevel, msgStr);
}
if (mode.levelForChat.isLessSpecificThan(level)) {
if (param.length > 0 && param[param.length - 1] instanceof Throwable)
@@ -92,8 +92,8 @@ public class ConfigBasedSpamLogger {
if (mode.levelForFile.isLessSpecificThan(level)) {
Level logLevel = level.isLessSpecificThan(Level.INFO) ? Level.INFO : level;
if (param.length > 0 && param[param.length-1] instanceof Throwable)
logger.atLevel(logLevel).withLocation().withThrowable((Throwable)param[param.length-1]).log(msgStr);
else logger.atLevel(logLevel).withLocation().log(msgStr);
logger.log(logLevel, msgStr, (Throwable)param[param.length-1]);
else logger.log(logLevel, msgStr);
}
if (mode.levelForChat.isLessSpecificThan(level)) {
if (param.length > 0 && param[param.length - 1] instanceof Throwable)