From 68561369f3c1334d46df9a218fb363546cdbfd5c Mon Sep 17 00:00:00 2001 From: KingRainbow44 Date: Tue, 11 Apr 2023 17:58:57 -0400 Subject: [PATCH] Move services loggers to 'debug-all' --- .../grasscutter/utils/StartupArguments.java | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/main/java/emu/grasscutter/utils/StartupArguments.java b/src/main/java/emu/grasscutter/utils/StartupArguments.java index ef0daa65e..c15cf1006 100644 --- a/src/main/java/emu/grasscutter/utils/StartupArguments.java +++ b/src/main/java/emu/grasscutter/utils/StartupArguments.java @@ -108,22 +108,20 @@ public final class StartupArguments { GAME_INFO.isShowPacketPayload = DEBUG_MODE_INFO.isShowPacketPayload; GAME_INFO.logPackets = DEBUG_MODE_INFO.logPackets; DISPATCH_INFO.logRequests = DEBUG_MODE_INFO.logRequests; + + // Log level to other third-party services + Level loggerLevel = DEBUG_MODE_INFO.servicesLoggersLevel; + // Change loggers to debug. + ((Logger) LoggerFactory.getLogger("io.javalin")).setLevel(loggerLevel); + ((Logger) LoggerFactory.getLogger("org.quartz")).setLevel(loggerLevel); + ((Logger) LoggerFactory.getLogger("org.reflections")).setLevel(loggerLevel); + ((Logger) LoggerFactory.getLogger("org.eclipse.jetty")).setLevel(loggerLevel); + ((Logger) LoggerFactory.getLogger("org.mongodb.driver")).setLevel(loggerLevel); } // Set the main logger to debug. Grasscutter.getLogger().setLevel(DEBUG_MODE_INFO.serverLoggerLevel); Grasscutter.getLogger().debug("The logger is now running in debug mode."); - - // Log level to other third-party services - Level loggerLevel = DEBUG_MODE_INFO.servicesLoggersLevel; - - // Change loggers to debug. - ((Logger) LoggerFactory.getLogger("io.javalin")).setLevel(loggerLevel); - ((Logger) LoggerFactory.getLogger("org.quartz")).setLevel(loggerLevel); - ((Logger) LoggerFactory.getLogger("org.reflections")).setLevel(loggerLevel); - ((Logger) LoggerFactory.getLogger("org.eclipse.jetty")).setLevel(loggerLevel); - ((Logger) LoggerFactory.getLogger("org.mongodb.driver")).setLevel(loggerLevel); - return false; } }