Disable debug logs by default

This commit is contained in:
Johannes Frohnmeyer 2022-08-28 17:24:46 +02:00
parent 1c0072c9df
commit 4bcb70e4ab
Signed by: Johannes
GPG Key ID: E76429612C2929F4
2 changed files with 8 additions and 7 deletions

View File

@ -24,12 +24,12 @@ public class GoogleChat implements ModInitializer {
return CompletableFuture.completedFuture(message);
original = message;
message = translateIfNeeded(message, Direction.C2S, true);
LOGGER.info("Applied C2S translation from " + original + " to " + message);
if (GoogleChatConfig.debugLogs) LOGGER.info("Applied C2S translation from " + original + " to " + message);
}
// All messages should be translated to the client language before sending
original = message;
message = translateIfNeeded(message, Direction.S2C, true);
LOGGER.info("Applied S2C translation from " + original + " to " + message);
if (GoogleChatConfig.debugLogs) LOGGER.info("Applied S2C translation from " + original + " to " + message);
return CompletableFuture.completedFuture(message);
});
}

View File

@ -6,15 +6,16 @@ import net.fabricmc.loader.api.*;
@JfConfig
public class GoogleChatConfig {
@Entry public static Boolean enabled = true;
@Entry public static boolean enabled = true;
@Entry public static String serverLanguage = "auto";
@Entry public static String clientLanguage = "en";
@Entry public static Boolean translationTooltip = false;
@Entry public static Boolean desugar = false;
@Entry public static boolean translationTooltip = false;
@Entry public static boolean desugar = false;
@Entry public static String receivingRegex = "";
@Entry public static Boolean receivingRegexIsBlacklist = true;
@Entry public static boolean receivingRegexIsBlacklist = true;
@Entry public static String sendingRegex = "";
@Entry public static Boolean sendingRegexIsBlacklist = true;
@Entry public static boolean sendingRegexIsBlacklist = true;
@Entry public static boolean debugLogs = FabricLoader.getInstance().isDevelopmentEnvironment();
@Preset
public static void client() {