diff options
author | TheKodeToad <TheKodeToad@proton.me> | 2022-11-05 17:14:12 +0000 |
---|---|---|
committer | TheKodeToad <TheKodeToad@proton.me> | 2022-11-08 17:38:23 +0000 |
commit | f2ca9a6b319ad0ade04837f6830e682bc86c01a2 (patch) | |
tree | f23ef9e85ffd118585451cbc219730cc14a76790 /libraries/launcher/org/prismlauncher/EntryPoint.java | |
parent | 50d40257fe8631338f9b6c278cc18c8ca9cab1a1 (diff) | |
download | PrismLauncher-f2ca9a6b319ad0ade04837f6830e682bc86c01a2.tar.gz PrismLauncher-f2ca9a6b319ad0ade04837f6830e682bc86c01a2.tar.bz2 PrismLauncher-f2ca9a6b319ad0ade04837f6830e682bc86c01a2.zip |
Revert switch to JUL for better colours
Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
Diffstat (limited to 'libraries/launcher/org/prismlauncher/EntryPoint.java')
-rw-r--r-- | libraries/launcher/org/prismlauncher/EntryPoint.java | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/libraries/launcher/org/prismlauncher/EntryPoint.java b/libraries/launcher/org/prismlauncher/EntryPoint.java index 512b01a9..34e65672 100644 --- a/libraries/launcher/org/prismlauncher/EntryPoint.java +++ b/libraries/launcher/org/prismlauncher/EntryPoint.java @@ -55,24 +55,21 @@ package org.prismlauncher; +import java.io.BufferedReader; +import java.io.IOException; +import java.io.InputStreamReader; +import java.nio.charset.StandardCharsets; + import org.prismlauncher.exception.ParseException; import org.prismlauncher.launcher.Launcher; import org.prismlauncher.launcher.impl.StandardLauncher; import org.prismlauncher.launcher.impl.legacy.LegacyLauncher; import org.prismlauncher.utils.Parameters; import org.prismlauncher.utils.StringUtils; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStreamReader; -import java.nio.charset.StandardCharsets; -import java.util.logging.Level; -import java.util.logging.Logger; +import org.prismlauncher.utils.logging.Log; public final class EntryPoint { - private static final Logger LOGGER = Logger.getLogger("EntryPoint"); - private EntryPoint() { } @@ -80,7 +77,7 @@ public final class EntryPoint { ExitCode exitCode = listen(); if (exitCode != ExitCode.NORMAL) { - LOGGER.warning("Exiting with " + exitCode); + Log.fatal("Exiting with " + exitCode); System.exit(exitCode.numericalCode); } @@ -123,14 +120,14 @@ public final class EntryPoint { preLaunchAction = PreLaunchAction.ABORT; } } catch (IOException | ParseException e) { - LOGGER.log(Level.SEVERE, "Launcher abort due to exception", e); + Log.fatal("Launcher abort due to exception", e); return ExitCode.ILLEGAL_ARGUMENT; } // Main loop if (preLaunchAction == PreLaunchAction.ABORT) { - LOGGER.info("Launch aborted by the launcher"); + Log.fatal("Launch aborted by the launcher"); return ExitCode.ABORT; } @@ -150,19 +147,22 @@ public final class EntryPoint { throw new IllegalArgumentException("Invalid launcher type: " + type); } + Log.launcher("Using " + type + " launcher"); + Log.blankLine(); + launcher.launch(); return ExitCode.NORMAL; } catch (IllegalArgumentException e) { - LOGGER.log(Level.SEVERE, "Wrong argument", e); + Log.fatal("Wrong argument", e); return ExitCode.ILLEGAL_ARGUMENT; } catch (ReflectiveOperationException e) { - LOGGER.log(Level.SEVERE, "Caught reflection exception from launcher", e); + Log.fatal("Caught reflection exception from launcher", e); return ExitCode.ERROR; } catch (Throwable e) { - LOGGER.log(Level.SEVERE, "Exception caught from launcher", e); + Log.fatal("Exception caught from launcher", e); return ExitCode.ERROR; } |