mirror of
https://github.com/Grasscutters/Grasscutter.git
synced 2025-12-20 19:04:40 +01:00
Debug system (#1894)
* Add build (compile) script: gradlew jar * Move server and services log levels to ConfigContainer, ability to enable/disable show packet payload and loop packets * Add some loop packets to known list
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package emu.grasscutter.config;
|
||||
|
||||
import ch.qos.logback.classic.Level;
|
||||
import com.google.gson.JsonObject;
|
||||
import emu.grasscutter.Grasscutter;
|
||||
import emu.grasscutter.Grasscutter.ServerDebugMode;
|
||||
@@ -101,6 +102,7 @@ public class ConfigContainer {
|
||||
public Game game = new Game();
|
||||
|
||||
public Dispatch dispatch = new Dispatch();
|
||||
public DebugMode debugMode = new DebugMode();
|
||||
}
|
||||
|
||||
public static class Language {
|
||||
@@ -150,6 +152,10 @@ public class ConfigContainer {
|
||||
public int kcpInterval = 20;
|
||||
/* Controls whether packets should be logged in console or not */
|
||||
public ServerDebugMode logPackets = ServerDebugMode.NONE;
|
||||
/* Show packet payload in console or no (in any case the payload is shown in encrypted view) */
|
||||
public Boolean isShowPacketPayload = false;
|
||||
/* Show annoying loop packets or no */
|
||||
public Boolean isShowLoopPackets = false;
|
||||
|
||||
public GameOptions gameOptions = new GameOptions();
|
||||
public JoinOptions joinOptions = new JoinOptions();
|
||||
@@ -163,9 +169,33 @@ public class ConfigContainer {
|
||||
|
||||
public String defaultName = "Grasscutter";
|
||||
|
||||
/* Controls whether http requests should be logged in console or not */
|
||||
public ServerDebugMode logRequests = ServerDebugMode.NONE;
|
||||
}
|
||||
|
||||
/* Debug options container, used when jar launch argument is -debug | -debugall and override default values
|
||||
* (see StartupArguments.enableDebug) */
|
||||
public static class DebugMode {
|
||||
/* Log level of the main server code (works only with -debug arg) */
|
||||
public Level serverLoggerLevel = Level.DEBUG;
|
||||
|
||||
/* Log level of the third-party services (works only with -debug arg):
|
||||
javalin, quartz, reflections, jetty, mongodb.driver*/
|
||||
public Level servicesLoggersLevel = Level.INFO;
|
||||
|
||||
/* Controls whether packets should be logged in console or not */
|
||||
public ServerDebugMode logPackets = ServerDebugMode.ALL;
|
||||
|
||||
/* Show packet payload in console or no (in any case the payload is shown in encrypted view) */
|
||||
public Boolean isShowPacketPayload = false;
|
||||
|
||||
/* Show annoying loop packets or no */
|
||||
public Boolean isShowLoopPackets = false;
|
||||
|
||||
/* Controls whether http requests should be logged in console or not */
|
||||
public ServerDebugMode logRequests = ServerDebugMode.ALL;
|
||||
}
|
||||
|
||||
public static class Encryption {
|
||||
public boolean useEncryption = true;
|
||||
/* Should 'https' be appended to URLs? */
|
||||
|
||||
Reference in New Issue
Block a user