mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 11:39:11 +03:00
[FIX] Slf4j detect fix
This commit is contained in:
parent
9f05594915
commit
1b7e463ddb
2 changed files with 3 additions and 7 deletions
|
@ -25,7 +25,6 @@ public class ClientLauncherWrapper {
|
||||||
public static int launcherMemoryLimit;
|
public static int launcherMemoryLimit;
|
||||||
|
|
||||||
public static void main(String[] arguments) throws IOException, InterruptedException {
|
public static void main(String[] arguments) throws IOException, InterruptedException {
|
||||||
System.setProperty("launcher.noSlf4j", "true"); //TODO: Normal fix
|
|
||||||
LogHelper.printVersion("Launcher");
|
LogHelper.printVersion("Launcher");
|
||||||
LogHelper.printLicense("Launcher");
|
LogHelper.printLicense("Launcher");
|
||||||
JVMHelper.checkStackTrace(ClientLauncherWrapper.class);
|
JVMHelper.checkStackTrace(ClientLauncherWrapper.class);
|
||||||
|
@ -74,7 +73,6 @@ public static void main(String[] arguments) throws IOException, InterruptedExcep
|
||||||
context.jvmProperties.put(LogHelper.DEBUG_PROPERTY, Boolean.toString(LogHelper.isDebugEnabled()));
|
context.jvmProperties.put(LogHelper.DEBUG_PROPERTY, Boolean.toString(LogHelper.isDebugEnabled()));
|
||||||
context.jvmProperties.put(LogHelper.STACKTRACE_PROPERTY, Boolean.toString(LogHelper.isStacktraceEnabled()));
|
context.jvmProperties.put(LogHelper.STACKTRACE_PROPERTY, Boolean.toString(LogHelper.isStacktraceEnabled()));
|
||||||
context.jvmProperties.put(LogHelper.DEV_PROPERTY, Boolean.toString(LogHelper.isDevEnabled()));
|
context.jvmProperties.put(LogHelper.DEV_PROPERTY, Boolean.toString(LogHelper.isDevEnabled()));
|
||||||
context.jvmProperties.put("launcher.noSlf4j", "true"); //TODO: Normal fix
|
|
||||||
context.addSystemProperty(DirBridge.CUSTOMDIR_PROPERTY);
|
context.addSystemProperty(DirBridge.CUSTOMDIR_PROPERTY);
|
||||||
context.addSystemProperty(DirBridge.USE_CUSTOMDIR_PROPERTY);
|
context.addSystemProperty(DirBridge.USE_CUSTOMDIR_PROPERTY);
|
||||||
context.addSystemProperty(DirBridge.USE_OPTDIR_PROPERTY);
|
context.addSystemProperty(DirBridge.USE_OPTDIR_PROPERTY);
|
||||||
|
|
|
@ -9,10 +9,7 @@
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.Collections;
|
import java.util.*;
|
||||||
import java.util.Locale;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.Set;
|
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
import java.util.function.Consumer;
|
import java.util.function.Consumer;
|
||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
|
@ -35,7 +32,8 @@ public final class LogHelper {
|
||||||
static {
|
static {
|
||||||
boolean useSlf4j = false;
|
boolean useSlf4j = false;
|
||||||
try {
|
try {
|
||||||
Class.forName("org.slf4j.Logger");
|
Class.forName("org.slf4j.Logger", false, LogHelper.class.getClassLoader());
|
||||||
|
Class.forName("org.slf4j.impl.StaticLoggerBinder", false, LogHelper.class.getClassLoader());
|
||||||
useSlf4j = !Boolean.getBoolean(NO_SLF4J_PROPERTY);
|
useSlf4j = !Boolean.getBoolean(NO_SLF4J_PROPERTY);
|
||||||
} catch (ClassNotFoundException ignored) {
|
} catch (ClassNotFoundException ignored) {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue