Clean up logging and log spam. #cleanloginitiative

This commit is contained in:
Vincent Lee committed 2016-06-04 19:01:34 -05:00
1 parent d241f95bee
commit 05c6a07bc2
14 files changed
+66 -70

No files matched your search

@@ -3,8 +3,8 @@ package vazkii.botania.client.core.handler;
import com.google.common.base.Throwables;
import net.minecraft.client.renderer.EntityRenderer;
import net.minecraft.client.renderer.entity.RenderManager;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.relauncher.ReflectionHelper;
import vazkii.botania.common.Botania;
import vazkii.botania.common.lib.LibObfuscation;
import java.lang.invoke.MethodHandle;
@@ -67,7 +67,7 @@ public final class ClientMethodHandles {
// f.setAccessible(true);
// equippedProgress_getter = MethodHandles.publicLookup().unreflectGetter(f);
} catch (IllegalAccessException e) {
FMLLog.severe("[Botania]: Couldn't initialize client methodhandles! Things will be broken!");
Botania.LOGGER.fatal("Couldn't initialize client methodhandles! Things will be broken!");
e.printStackTrace();
throw Throwables.propagate(e);
}
@@ -21,13 +21,13 @@ import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.EnumPlayerModelParts;
import net.minecraft.init.Blocks;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.FMLLog;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.BotaniaAPIClient;
import vazkii.botania.api.item.IBaubleRender.Helper;
import vazkii.botania.api.subtile.signature.SubTileSignature;
import vazkii.botania.client.core.helper.IconHelper;
import vazkii.botania.client.core.helper.ShaderHelper;
import vazkii.botania.common.Botania;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.core.version.VersionChecker;
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
@@ -208,7 +208,7 @@ public final class ContributorFancinessHandler implements LayerRenderer<EntityPl
load(props);
}
} catch (IOException e) {
FMLLog.info("[Botania] Could not load contributors list. Either you're offline or github is down. Nothing to worry about, carry on~");
Botania.LOGGER.info("Could not load contributors list. Either you're offline or github is down. Nothing to worry about, carry on~");
}
VersionChecker.doneChecking = true;
}
@@ -17,7 +17,6 @@ import net.minecraft.launchwrapper.Launch;
import net.minecraftforge.client.event.ModelBakeEvent;
import net.minecraftforge.client.event.TextureStitchEvent;
import net.minecraftforge.event.entity.player.ArrowLooseEvent;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import org.apache.commons.lang3.text.WordUtils;
import org.lwjgl.BufferUtils;
@@ -27,6 +26,7 @@ import vazkii.botania.client.core.helper.IconHelper;
import vazkii.botania.client.model.FloatingFlowerModel;
import vazkii.botania.client.model.LexiconModel;
import vazkii.botania.client.model.PlatformModel;
import vazkii.botania.common.Botania;
import vazkii.botania.common.integration.buildcraft.TriggerManaLevel;
import vazkii.botania.common.item.ItemSparkUpgrade;
import vazkii.botania.common.item.equipment.bauble.ItemFlightTiara;
@@ -161,7 +161,7 @@ public class MiscellaneousIcons {
int width = GL11.glGetTexLevelParameteri(GL11.GL_TEXTURE_2D, 0, GL11.GL_TEXTURE_WIDTH);
int height = GL11.glGetTexLevelParameteri(GL11.GL_TEXTURE_2D, 0, GL11.GL_TEXTURE_HEIGHT);
FMLLog.info("[Botania]: Dumped atlas %d wide by %d tall%n", width, height);
Botania.LOGGER.debug("Dumped atlas %d wide by %d tall%n", width, height);
int pixels = width * height;
@@ -191,7 +191,7 @@ public class MiscellaneousIcons {
try {
ImageIO.write(bufferedimage, "png", result);
} catch (IOException e) {
FMLLog.warning("[Botania]: Failed to dump debug atlas");
Botania.LOGGER.warn("Failed to dump debug atlas");
}
}
@@ -17,11 +17,11 @@ import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.util.text.TextFormatting;
import net.minecraftforge.client.event.RenderHandEvent;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import org.lwjgl.util.glu.Project;
import vazkii.botania.client.gui.lexicon.GuiLexicon;
import vazkii.botania.client.lib.LibResources;
import vazkii.botania.common.Botania;
import vazkii.botania.common.core.handler.ConfigHandler;
import vazkii.botania.common.core.helper.PlayerHelper;
import vazkii.botania.common.item.ItemLexicon;
@@ -95,8 +95,7 @@ public class RenderLexicon {
}
// End EntityRenderer.renderHand copy
} catch (Throwable throwable) {
FMLLog.warning("[Botania]: Failed to render lexicon");
throwable.printStackTrace();
Botania.LOGGER.warn("Failed to render lexicon");
}
}
@@ -11,8 +11,6 @@
package vazkii.botania.client.core.helper;
import net.minecraft.client.renderer.OpenGlHelper;
import net.minecraftforge.fml.common.FMLLog;
import org.apache.logging.log4j.Level;
import org.lwjgl.opengl.ARBFragmentShader;
import org.lwjgl.opengl.ARBShaderObjects;
import org.lwjgl.opengl.ARBVertexShader;
@@ -20,6 +18,7 @@ import org.lwjgl.opengl.GL11;
import vazkii.botania.api.internal.ShaderCallback;
import vazkii.botania.client.core.handler.ClientTickHandler;
import vazkii.botania.client.lib.LibResources;
import vazkii.botania.common.Botania;
import vazkii.botania.common.core.handler.ConfigHandler;
import java.io.BufferedReader;
@@ -109,13 +108,13 @@ public final class ShaderHelper {
ARBShaderObjects.glLinkProgramARB(program);
if(ARBShaderObjects.glGetObjectParameteriARB(program, ARBShaderObjects.GL_OBJECT_LINK_STATUS_ARB) == GL11.GL_FALSE) {
FMLLog.log(Level.ERROR, getLogInfo(program));
Botania.LOGGER.error(getLogInfo(program));
return 0;
}
ARBShaderObjects.glValidateProgramARB(program);
if (ARBShaderObjects.glGetObjectParameteriARB(program, ARBShaderObjects.GL_OBJECT_VALIDATE_STATUS_ARB) == GL11.GL_FALSE) {
FMLLog.log(Level.ERROR, getLogInfo(program));
Botania.LOGGER.error(getLogInfo(program));
return 0;
}
@@ -30,7 +30,6 @@ import net.minecraftforge.client.model.animation.AnimationTESR;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.client.registry.ClientRegistry;
import net.minecraftforge.fml.client.registry.RenderingRegistry;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
@@ -103,6 +102,7 @@ import vazkii.botania.client.render.tile.RenderTileTerraPlate;
import vazkii.botania.client.render.tile.RenderTileTeruTeruBozu;
import vazkii.botania.client.render.tile.RenderTileTinyPotato;
import vazkii.botania.client.render.world.SkyblockRenderEvents;
import vazkii.botania.common.Botania;
import vazkii.botania.common.block.tile.TileAlfPortal;
import vazkii.botania.common.block.tile.TileAltar;
import vazkii.botania.common.block.tile.TileAvatar;
@@ -173,8 +173,7 @@ public class ClientProxy extends CommonProxy {
PersistentVariableHelper.load();
PersistentVariableHelper.save();
} catch (IOException e) {
FMLLog.severe("Botania's persistent Variables couldn't load!");
e.printStackTrace();
Botania.LOGGER.fatal("Persistent Variables couldn't load!!");
}
super.preInit(event);
@@ -35,10 +35,10 @@ import net.minecraftforge.client.model.pipeline.UnpackedBakedQuad;
import net.minecraftforge.client.model.pipeline.VertexTransformer;
import net.minecraftforge.common.model.TRSRTransformation;
import net.minecraftforge.common.property.IExtendedBlockState;
import net.minecraftforge.fml.common.FMLLog;
import vazkii.botania.api.BotaniaAPIClient;
import vazkii.botania.api.item.IFloatingFlower;
import vazkii.botania.api.state.BotaniaStateProps;
import vazkii.botania.common.Botania;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.item.block.ItemBlockFloatingSpecialFlower;
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
@@ -132,7 +132,7 @@ public class FloatingFlowerModel implements IBakedModel, IResourceManagerReloadL
// Enhance!
CompositeBakedModel model = new CompositeBakedModel(flowerModel, islandModel);
FMLLog.info("[Botania]: Cached floating flower model for islandtype %s and flowertype %s", islandType, identifier);
Botania.LOGGER.debug("Cached floating flower model for islandtype %s and flowertype %s", islandType, identifier);
CACHE.put(islandType, identifier, model);
return model;
}
@@ -41,10 +41,10 @@ import net.minecraftforge.client.model.SimpleModelState;
import net.minecraftforge.common.model.IModelState;
import net.minecraftforge.common.model.TRSRTransformation;
import net.minecraftforge.common.property.IExtendedBlockState;
import net.minecraftforge.fml.common.FMLLog;
import org.apache.commons.lang3.tuple.Pair;
import vazkii.botania.api.BotaniaAPIClient;
import vazkii.botania.api.state.BotaniaStateProps;
import vazkii.botania.common.Botania;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.item.block.ItemBlockSpecialFlower;
@@ -127,7 +127,7 @@ public class SpecialFlowerModel implements IModelCustomData {
if(e.isJsonPrimitive() && e.getAsJsonPrimitive().isString()) {
return new ModelResourceLocation(e.getAsString());
}
FMLLog.severe("Expect ModelResourceLocation, got: ", json);
Botania.LOGGER.error("Expect ModelResourceLocation, got: ", json);
return new ModelResourceLocation("builtin/missing", "missing");
}
@@ -34,6 +34,8 @@ import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.event.FMLServerStoppingEvent;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.PlayerEvent;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
import vazkii.botania.common.core.handler.IMCHandler;
import vazkii.botania.common.core.handler.ManaNetworkHandler;
import vazkii.botania.common.core.proxy.CommonProxy;
@@ -60,6 +62,8 @@ public class Botania {
@SidedProxy(serverSide = LibMisc.PROXY_COMMON, clientSide = LibMisc.PROXY_CLIENT)
public static CommonProxy proxy;
public static final Logger LOGGER = LogManager.getLogger(LibMisc.MOD_ID);
@EventHandler
public void preInit(FMLPreInitializationEvent event) {
gardenOfGlassLoaded = Loader.isModLoaded("GardenOfGlass");
@@ -73,7 +77,7 @@ public class Botania {
quarkLoaded = Loader.isModLoaded("Quark");
storageDrawersLoaded = Loader.isModLoaded("StorageDrawers");
proxy.preInit(event);
MinecraftForge.EVENT_BUS.register(this);
}
@@ -4,8 +4,8 @@ import com.google.common.base.Throwables;
import net.minecraft.block.SoundType;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.tileentity.MobSpawnerBaseLogic;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.relauncher.ReflectionHelper;
import vazkii.botania.common.Botania;
import vazkii.botania.common.lib.LibObfuscation;
import java.lang.invoke.MethodHandle;
@@ -89,7 +89,7 @@ public final class MethodHandles {
m.setAccessible(true);
isActivated = publicLookup().unreflect(m);
} catch (Throwable t) {
FMLLog.severe("[Botania]: Couldn't initialize methodhandles! Things will be broken!");
Botania.LOGGER.fatal("Couldn't initialize methodhandles! Things will be broken!");
t.printStackTrace();
throw Throwables.propagate(t);
}
@@ -28,7 +28,6 @@ import net.minecraft.util.text.translation.I18n;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.fml.common.FMLCommonHandler;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLInterModComms;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
@@ -36,7 +35,6 @@ import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;
import net.minecraftforge.fml.common.event.FMLServerAboutToStartEvent;
import net.minecraftforge.fml.common.event.FMLServerStartingEvent;
import net.minecraftforge.fml.common.network.NetworkRegistry;
import org.apache.logging.log4j.Level;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.api.boss.IBotaniaBoss;
import vazkii.botania.api.lexicon.ITwoNamedPage;
@@ -169,7 +167,7 @@ public class CommonProxy {
if(page instanceof ITwoNamedPage)
words += countWords(((ITwoNamedPage) page).getSecondUnlocalizedName());
}
FMLLog.log(Level.INFO, "[Botania] The Lexica Botania has %d words.", words);
Botania.LOGGER.info("The Lexica Botania has %d words.", words);
registerDefaultEntityBlacklist();
}
@@ -21,13 +21,11 @@ import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.util.ResourceLocation;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.fml.common.registry.GameRegistry;
import net.minecraftforge.oredict.OreDictionary;
import net.minecraftforge.oredict.RecipeSorter;
import net.minecraftforge.oredict.ShapedOreRecipe;
import net.minecraftforge.oredict.ShapelessOreRecipe;
import org.apache.logging.log4j.Level;
import vazkii.botania.api.BotaniaAPI;
import vazkii.botania.common.Botania;
import vazkii.botania.common.block.ModBlocks;
@@ -2176,7 +2174,7 @@ public final class ModCraftingRecipes {
initGardenOfGlass();
int newRecipeListSize = CraftingManager.getInstance().getRecipeList().size();
FMLLog.log(Level.INFO, "[Botania] Registered %d recipes.", newRecipeListSize - recipeListSize);
Botania.LOGGER.info("Registered %d recipes.", newRecipeListSize - recipeListSize);
}
private static void initGardenOfGlass() {
@@ -11,14 +11,13 @@ package vazkii.botania.common.integration.corporea;
import net.minecraft.inventory.IInventory;
import net.minecraft.item.ItemStack;
import net.minecraftforge.fml.common.FMLLog;
import net.minecraftforge.items.wrapper.InvWrapper;
import org.apache.logging.log4j.Level;
import powercrystals.minefactoryreloaded.api.IDeepStorageUnit;
import vazkii.botania.api.corporea.CorporeaRequest;
import vazkii.botania.api.corporea.ICorporeaSpark;
import vazkii.botania.api.corporea.IWrappedInventory;
import vazkii.botania.api.corporea.InvWithLocation;
import vazkii.botania.common.Botania;
import java.util.ArrayList;
import java.util.List;
@@ -129,7 +128,7 @@ public class WrappedDeepStorage extends WrappedInventoryBase {
deepStoragePresent = false;
}
checkedInterface = true;
FMLLog.log(Level.INFO, "[Botania] Corporea support for Deep Storage: %b", deepStoragePresent);
Botania.LOGGER.info("Corporea support for Deep Storage: %b", deepStoragePresent);
}
return deepStoragePresent;
}
@@ -237,22 +237,22 @@ vt 0.0625 0.5234 0.5741
# 24 texture coords
g Ring_Gem01
s 2
f 23/63/21 24/64/21 25/65/21
f 25/65/21 26/66/21 23/63/21
s 4
f 27/67/22 28/68/22 29/69/22
f 29/69/22 30/70/22 27/67/22
s 8
f 23/71/23 26/72/23 28/73/23
f 28/73/23 27/74/23 23/71/23
s 16
f 26/75/24 25/76/24 29/77/24
f 29/77/24 28/78/24 26/75/24
s 32
f 25/79/25 24/80/25 30/81/25
f 30/81/25 29/82/25 25/79/25
s 64
f 24/83/26 23/84/26 27/85/26
f 27/85/26 30/86/26 24/83/26
# 12 faces
@@ -306,22 +306,22 @@ vt 0.0625 0.5234 0.5741
# 24 texture coords
g Ring_Gem02
s 2
f 31/87/27 32/88/27 33/89/27
f 33/89/27 34/90/27 31/87/27
s 4
f 35/91/28 36/92/28 37/93/28
f 37/93/28 38/94/28 35/91/28
s 8
f 31/95/29 34/96/29 36/97/29
f 36/97/29 35/98/29 31/95/29
s 16
f 34/99/30 33/100/30 37/101/30
f 37/101/30 36/102/30 34/99/30
s 32
f 33/103/31 32/104/31 38/105/31
f 38/105/31 37/106/31 33/103/31
s 64
f 32/107/32 31/108/32 35/109/32
f 35/109/32 38/110/32 32/107/32
# 12 faces
@@ -375,22 +375,22 @@ vt 0.0234 0.7813 0.5817
# 24 texture coords
g Ring_Panel02
s 2
f 39/111/33 40/112/33 41/113/33
f 41/113/33 42/114/33 39/111/33
s 4
f 43/115/34 44/116/34 45/117/34
f 45/117/34 46/118/34 43/115/34
s 8
f 39/119/35 42/120/35 44/121/35
f 44/121/35 43/122/35 39/119/35
s 16
f 42/123/36 41/124/36 45/125/36
f 45/125/36 44/126/36 42/123/36
s 32
f 41/127/37 40/128/37 46/129/37
f 46/129/37 45/130/37 41/127/37
s 64
f 40/131/38 39/132/38 43/133/38
f 43/133/38 46/134/38 40/131/38
# 12 faces
@@ -444,22 +444,22 @@ vt 0.0234 0.7813 0.5817
# 24 texture coords
g Ring_Panel01
s 2
f 47/135/39 48/136/39 49/137/39
f 49/137/39 50/138/39 47/135/39
s 4
f 51/139/40 52/140/40 53/141/40
f 53/141/40 54/142/40 51/139/40
s 8
f 47/143/41 50/144/41 52/145/41
f 52/145/41 51/146/41 47/143/41
s 16
f 50/147/42 49/148/42 53/149/42
f 53/149/42 52/150/42 50/147/42
s 32
f 49/151/43 48/152/43 54/153/43
f 54/153/43 53/154/43 49/151/43
s 64
f 48/155/44 47/156/44 51/157/44
f 51/157/44 54/158/44 48/155/44
# 12 faces
@@ -588,7 +588,7 @@ vt 0.2578 0.6250 0.8551
# 68 texture coords
g Crystal_Ring
s off
f 55/159/45 56/160/45 57/161/45
f 57/161/45 58/162/45 55/159/45
f 56/163/46 59/164/46 60/165/46
@@ -704,22 +704,22 @@ vt 0.0625 0.5234 0.5741
# 24 texture coords
g Ring_Gem04
s 2
f 87/227/58 88/228/58 89/229/58
f 89/229/58 90/230/58 87/227/58
s 4
f 91/231/59 92/232/59 93/233/59
f 93/233/59 94/234/59 91/231/59
s 8
f 87/235/60 90/236/60 92/237/60
f 92/237/60 91/238/60 87/235/60
s 16
f 90/239/61 89/240/61 93/241/61
f 93/241/61 92/242/61 90/239/61
s 32
f 89/243/62 88/244/62 94/245/62
f 94/245/62 93/246/62 89/243/62
s 64
f 88/247/63 87/248/63 91/249/63
f 91/249/63 94/250/63 88/247/63
# 12 faces
@@ -773,22 +773,22 @@ vt 0.0234 0.7813 0.5817
# 24 texture coords
g Ring_Panel04
s 2
f 95/251/64 96/252/64 97/253/64
f 97/253/64 98/254/64 95/251/64
s 4
f 99/255/65 100/256/65 101/257/65
f 101/257/65 102/258/65 99/255/65
s 8
f 95/259/66 98/260/66 100/261/66
f 100/261/66 99/262/66 95/259/66
s 16
f 98/263/67 97/264/67 101/265/67
f 101/265/67 100/266/67 98/263/67
s 32
f 97/267/68 96/268/68 102/269/68
f 102/269/68 101/270/68 97/267/68
s 64
f 96/271/69 95/272/69 99/273/69
f 99/273/69 102/274/69 96/271/69
# 12 faces