Disable debug logs by default
This commit is contained in:
parent
1c0072c9df
commit
4bcb70e4ab
|
@ -24,12 +24,12 @@ public class GoogleChat implements ModInitializer {
|
||||||
return CompletableFuture.completedFuture(message);
|
return CompletableFuture.completedFuture(message);
|
||||||
original = message;
|
original = message;
|
||||||
message = translateIfNeeded(message, Direction.C2S, true);
|
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
|
// All messages should be translated to the client language before sending
|
||||||
original = message;
|
original = message;
|
||||||
message = translateIfNeeded(message, Direction.S2C, true);
|
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);
|
return CompletableFuture.completedFuture(message);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,15 +6,16 @@ import net.fabricmc.loader.api.*;
|
||||||
|
|
||||||
@JfConfig
|
@JfConfig
|
||||||
public class GoogleChatConfig {
|
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 serverLanguage = "auto";
|
||||||
@Entry public static String clientLanguage = "en";
|
@Entry public static String clientLanguage = "en";
|
||||||
@Entry public static Boolean translationTooltip = false;
|
@Entry public static boolean translationTooltip = false;
|
||||||
@Entry public static Boolean desugar = false;
|
@Entry public static boolean desugar = false;
|
||||||
@Entry public static String receivingRegex = "";
|
@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 String sendingRegex = "";
|
||||||
@Entry public static Boolean sendingRegexIsBlacklist = true;
|
@Entry public static boolean sendingRegexIsBlacklist = true;
|
||||||
|
@Entry public static boolean debugLogs = FabricLoader.getInstance().isDevelopmentEnvironment();
|
||||||
|
|
||||||
@Preset
|
@Preset
|
||||||
public static void client() {
|
public static void client() {
|
||||||
|
|
Loading…
Reference in New Issue