mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-12-22 16:41:46 +03:00
[FIX] Oshi requires slf4j api
This commit is contained in:
parent
e5840243b3
commit
bd677c26ba
2 changed files with 3 additions and 5 deletions
|
@ -47,9 +47,7 @@
|
|||
pack project(':LauncherAPI')
|
||||
pack project(':LauncherClient')
|
||||
pack project(':LauncherStart')
|
||||
bundle(group: 'com.github.oshi', name: 'oshi-core', version: rootProject['verOshiCore']) {
|
||||
exclude group: 'org.slf4j'
|
||||
}
|
||||
bundle(group: 'com.github.oshi', name: 'oshi-core', version: rootProject['verOshiCore'])
|
||||
}
|
||||
|
||||
tasks.register('genRuntimeJS', Zip) {
|
||||
|
|
|
@ -23,7 +23,7 @@ public final class LogHelper {
|
|||
public static final String DEV_PROPERTY = "launcher.dev";
|
||||
public static final String STACKTRACE_PROPERTY = "launcher.stacktrace";
|
||||
public static final String NO_JANSI_PROPERTY = "launcher.noJAnsi";
|
||||
public static final String NO_SLF4J_PROPERTY = "launcher.noSlf4j";
|
||||
public static final String SLF4J_PROPERTY = "launcher.useSlf4j";
|
||||
private static final Set<Consumer<Throwable>> EXCEPTIONS_CALLBACKS = Collections.newSetFromMap(new ConcurrentHashMap<>(2));
|
||||
private static final LogHelperAppender impl;
|
||||
|
||||
|
@ -31,7 +31,7 @@ public final class LogHelper {
|
|||
boolean useSlf4j = false;
|
||||
try {
|
||||
Class.forName("org.slf4j.Logger", false, LogHelper.class.getClassLoader());
|
||||
useSlf4j = !Boolean.getBoolean(NO_SLF4J_PROPERTY);
|
||||
useSlf4j = Boolean.getBoolean(SLF4J_PROPERTY);
|
||||
} catch (ClassNotFoundException ignored) {
|
||||
}
|
||||
if (useSlf4j) {
|
||||
|
|
Loading…
Reference in a new issue