Hide network config changes by default

This commit is contained in:
James Seibel
2025-12-22 14:51:29 -06:00
parent a29567430e
commit 8d94b86bfd
3 changed files with 15 additions and 1 deletions
@@ -1603,6 +1603,14 @@ public class Config
+ "This can be useful for debugging.")
.build();
public static ConfigEntry<EDhApiLoggerLevel> logConnectionConfigChangesToFile = new ConfigEntry.Builder<EDhApiLoggerLevel>()
.setChatCommandName("logging.logConnectionConfigChanges")
.set(EDhApiLoggerLevel.WARN)
.comment(""
+ "If enabled, config changes sent by the server will be logged. \n"
+ "")
.build();
public static ConfigCategory warning = new ConfigCategory.Builder().set(Warning.class).build();
@@ -30,6 +30,10 @@ public class ClientNetworkState implements Closeable
.fileLevelConfig(Config.Common.Logging.logNetworkEventToFile)
.build();
protected static final DhLogger CONFIG_CHANGE_LOGGER = new DhLoggerBuilder()
.fileLevelConfig(Config.Common.Logging.logConnectionConfigChangesToFile)
.build();
private static final IMinecraftClientWrapper MC_CLIENT = SingletonInjector.INSTANCE.get(IMinecraftClientWrapper.class);
@@ -132,7 +136,7 @@ public class ClientNetworkState implements Closeable
this.serverSupportStatus = EServerSupportStatus.FULL;
String configChanges = this.sessionConfig.getDifferencesAsString(message.config);
LOGGER.info("Connection config has been changed: [" + configChanges + "].");
CONFIG_CHANGE_LOGGER.info("Connection config has been changed: [" + configChanges + "].");
this.sessionConfig = message.config;
this.configReceived = true;
@@ -718,6 +718,8 @@
"OpenGL Events - Chat",
"distanthorizons.config.common.logging.logNetworkEventToFile":
"Network Events - File",
"distanthorizons.config.common.logging.logConnectionConfigChangesToFile":
"Network Connection Config Changes - File",
"distanthorizons.config.common.logging.warning":
"Warnings",