Move services loggers to 'debug-all'

This commit is contained in:
KingRainbow44 2023-04-11 17:58:57 -04:00
parent 5851761d59
commit 68561369f3
No known key found for this signature in database
GPG Key ID: FC2CB64B00D257BE

View File

@ -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;
}
}