mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-01-22 15:24:23 +03:00
[FIX] Фикс двойных логов
This commit is contained in:
parent
64b1e9cff0
commit
cffaed6de8
1 changed files with 4 additions and 4 deletions
|
@ -50,7 +50,7 @@ public enum OutputTypes
|
|||
PLAIN, JANSI, HTML
|
||||
}
|
||||
private static final Set<OutputEnity> OUTPUTS = Collections.newSetFromMap(new ConcurrentHashMap<>(2));
|
||||
private static final Output STD_OUTPUT;
|
||||
private static final OutputEnity STD_OUTPUT;
|
||||
|
||||
private LogHelper() {
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ public static void printLicense(String product) {
|
|||
}
|
||||
|
||||
@LauncherAPI
|
||||
public static boolean removeOutput(Output output) {
|
||||
public static boolean removeOutput(OutputEnity output) {
|
||||
return OUTPUTS.remove(output);
|
||||
}
|
||||
|
||||
|
@ -397,8 +397,8 @@ private static String formatLicense(String product) {
|
|||
JANSI = jansi;
|
||||
|
||||
// Add std writer
|
||||
STD_OUTPUT = System.out::println;
|
||||
addOutput(STD_OUTPUT, JANSI ? OutputTypes.JANSI : OutputTypes.PLAIN);
|
||||
STD_OUTPUT = new OutputEnity(System.out::println, JANSI ? OutputTypes.JANSI : OutputTypes.PLAIN);
|
||||
addOutput(STD_OUTPUT);
|
||||
|
||||
// Add file log writer
|
||||
String logFile = System.getProperty("launcher.logFile");
|
||||
|
|
Loading…
Reference in a new issue