From 091d8c69a3d698e3c14dd1435067a6c3d13fae04 Mon Sep 17 00:00:00 2001 From: KingRainbow44 Date: Sun, 26 Jun 2022 12:23:07 -0400 Subject: [PATCH] Add a debug flag for the logger --- src/main/java/emu/grasscutter/Grasscutter.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/emu/grasscutter/Grasscutter.java b/src/main/java/emu/grasscutter/Grasscutter.java index f8c4bb4ab..7f187e04a 100644 --- a/src/main/java/emu/grasscutter/Grasscutter.java +++ b/src/main/java/emu/grasscutter/Grasscutter.java @@ -1,5 +1,6 @@ package emu.grasscutter; +import ch.qos.logback.classic.Level; import ch.qos.logback.classic.Logger; import com.google.gson.Gson; import com.google.gson.GsonBuilder; @@ -8,11 +9,8 @@ import emu.grasscutter.auth.DefaultAuthentication; import emu.grasscutter.command.CommandMap; import emu.grasscutter.command.DefaultPermissionHandler; import emu.grasscutter.command.PermissionHandler; -import emu.grasscutter.game.dungeons.challenge.DungeonChallenge; import emu.grasscutter.data.ResourceLoader; import emu.grasscutter.database.DatabaseManager; -import emu.grasscutter.game.managers.energy.EnergyManager; -import emu.grasscutter.game.managers.stamina.StaminaManager; import emu.grasscutter.plugin.PluginManager; import emu.grasscutter.plugin.api.ServerHook; import emu.grasscutter.scripts.ScriptLoader; @@ -102,6 +100,10 @@ public final class Grasscutter { System.out.println("Grasscutter version: " + BuildConfig.VERSION + "-" + BuildConfig.GIT_HASH); exitEarly = true; } + case "-debug" -> { + log.setLevel(Level.DEBUG); + log.debug("The logger is now running in debug mode."); + } } }