Hide network config changes by default
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
|
||||
+5
-1
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user