From 851f9c1da669d9dd42096dfd03bda7f0f47f6fc7 Mon Sep 17 00:00:00 2001 From: Lex Manos Date: Tue, 9 Jun 2015 21:20:53 -0700 Subject: [PATCH] Cleanup some spammy output. --- .../fml/common/asm/transformers/AccessTransformer.java | 2 +- .../fml/common/asm/transformers/ModAPITransformer.java | 2 +- .../cpw/mods/fml/common/registry/LanguageRegistry.java | 9 ++++++++- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/fml/src/main/java/cpw/mods/fml/common/asm/transformers/AccessTransformer.java b/fml/src/main/java/cpw/mods/fml/common/asm/transformers/AccessTransformer.java index c428896c6..62dd29e1e 100644 --- a/fml/src/main/java/cpw/mods/fml/common/asm/transformers/AccessTransformer.java +++ b/fml/src/main/java/cpw/mods/fml/common/asm/transformers/AccessTransformer.java @@ -118,7 +118,7 @@ public class AccessTransformer implements IClassTransformer rulesResource = Resources.getResource(rulesFile); } processATFile(Resources.asCharSource(rulesResource, Charsets.UTF_8)); - FMLRelaunchLog.fine("Loaded %d rules from AccessTransformer config file %s\n", modifiers.size(), rulesFile); + FMLRelaunchLog.fine("Loaded %d rules from AccessTransformer config file %s", modifiers.size(), rulesFile); } protected void processATFile(CharSource rulesResource) throws IOException { diff --git a/fml/src/main/java/cpw/mods/fml/common/asm/transformers/ModAPITransformer.java b/fml/src/main/java/cpw/mods/fml/common/asm/transformers/ModAPITransformer.java index 4f01d0c0b..9fd6f45ff 100644 --- a/fml/src/main/java/cpw/mods/fml/common/asm/transformers/ModAPITransformer.java +++ b/fml/src/main/java/cpw/mods/fml/common/asm/transformers/ModAPITransformer.java @@ -25,7 +25,7 @@ import cpw.mods.fml.relauncher.FMLRelaunchLog; public class ModAPITransformer implements IClassTransformer { - private static final boolean logDebugInfo = Boolean.valueOf(System.getProperty("fml.debugAPITransformer", "true")); + private static final boolean logDebugInfo = Boolean.valueOf(System.getProperty("fml.debugAPITransformer", "false")); private ListMultimap optionals; @Override diff --git a/fml/src/main/java/cpw/mods/fml/common/registry/LanguageRegistry.java b/fml/src/main/java/cpw/mods/fml/common/registry/LanguageRegistry.java index 8593295c6..a906f5bb3 100644 --- a/fml/src/main/java/cpw/mods/fml/common/registry/LanguageRegistry.java +++ b/fml/src/main/java/cpw/mods/fml/common/registry/LanguageRegistry.java @@ -20,6 +20,7 @@ import java.io.InputStreamReader; import java.net.URL; import java.util.Collections; import java.util.HashMap; +import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.Properties; @@ -35,6 +36,8 @@ import net.minecraft.item.ItemStack; import net.minecraft.util.StringTranslate; import com.google.common.base.Charsets; +import com.google.common.base.Joiner; +import com.google.common.collect.Lists; import cpw.mods.fml.common.FMLCommonHandler; import cpw.mods.fml.common.FMLLog; @@ -273,13 +276,15 @@ public class LanguageRegistry private void searchZipForLanguages(File source, Side side) throws IOException { ZipFile zf = new ZipFile(source); + List added = Lists.newArrayList(); for (ZipEntry ze : Collections.list(zf.entries())) { Matcher matcher = assetENUSLang.matcher(ze.getName()); if (matcher.matches()) { String lang = matcher.group(2); - FMLLog.fine("Injecting found translation data for lang %s in zip file %s at %s into language system", lang, source.getName(), ze.getName()); + //FMLLog.fine("Injecting found translation data for lang %s in zip file %s at %s into language system", lang, source.getName(), ze.getName()); + added.add(lang); LanguageRegistry.instance().injectLanguage(lang, StringTranslate.parseLangFile(zf.getInputStream(ze))); // Ensure en_US is available to StringTranslate on the server if ("en_US".equals(lang) && side == Side.SERVER) @@ -288,6 +293,8 @@ public class LanguageRegistry } } } + if (added.size() > 0) + FMLLog.fine("Found translations in %s [%s]", source.getName(), Joiner.on(", ").join(added)); zf.close(); }