diff --git a/desktop/src/cn/harryh/arkpets/BootstrapLauncher.java b/desktop/src/cn/harryh/arkpets/BootstrapLauncher.java index 89b94a6..d058665 100644 --- a/desktop/src/cn/harryh/arkpets/BootstrapLauncher.java +++ b/desktop/src/cn/harryh/arkpets/BootstrapLauncher.java @@ -31,29 +31,29 @@ public static void main(String[] args) { // Disable assistive technologies System.setProperty("javax.accessibility.assistive_technologies", ""); ArgPending.argCache = args; - ArkConfig appConfig = Objects.requireNonNull(ArkConfig.getConfig(), "ArkConfig returns a null instance, please check the config file."); // Logger - Logger.initialize(Const.LogConfig.logCorePath, Const.LogConfig.logCoreMaxKeep); + Logger.initialize(LogConfig.logDesktopPath, LogConfig.logDesktopMaxKeep); + ArkConfig appConfig = Objects.requireNonNull(ArkConfig.getConfig(), "ArkConfig returns a null instance, please check the config file."); try { Logger.setLevel(appConfig.logging_level); } catch (Exception ignored) { } - new ArgPending(Const.LogConfig.errorArg, args) { + new ArgPending(LogConfig.errorArg, args) { protected void process(String command, String addition) { Logger.setLevel(Logger.ERROR); } }; - new ArgPending(Const.LogConfig.warnArg, args) { + new ArgPending(LogConfig.warnArg, args) { protected void process(String command, String addition) { Logger.setLevel(Logger.WARN); } }; - new ArgPending(Const.LogConfig.infoArg, args) { + new ArgPending(LogConfig.infoArg, args) { protected void process(String command, String addition) { Logger.setLevel(Logger.INFO); } }; - new ArgPending(Const.LogConfig.debugArg, args) { + new ArgPending(LogConfig.debugArg, args) { protected void process(String command, String addition) { Logger.setLevel(Logger.DEBUG); } @@ -63,6 +63,7 @@ protected void process(String command, String addition) { // If requested to start the core app directly new ArgPending("--direct-start", args) { protected void process(String command, String addition) { + Logger.initialize(LogConfig.logCorePath, LogConfig.logCoreMaxKeep); startCore(appConfig); System.exit(0); }