Convert to Java logging framework. Closes #227.

This commit is contained in:
Sunstrike committed 2013-10-12 23:46:35 +01:00
1 parent 9bdbd6c6f1
commit 5c043d66f4
46 files changed
+127 -105

No files matched your search

+11 -8
View File
@@ -5,6 +5,7 @@ import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.logging.Logger;
import tconstruct.library.crafting.Detailing;
import tconstruct.library.crafting.LiquidCasting;
@@ -31,6 +32,8 @@ public class TConstructRegistry
{
public static TConstructRegistry instance = new TConstructRegistry();
public static Logger logger = Logger.getLogger("TCon-API");
/* Creative tabs */
public static TabTools toolTab;
public static TabTools materialTab;
@@ -67,7 +70,7 @@ public class TConstructRegistry
{
Item add = itemDirectory.get(name);
if (add != null)
System.out.println("[TCon API] " + name + " is already present in the Item directory");
logger.warning(name + " is already present in the Item directory");
itemDirectory.put(name, itemstack);
}
@@ -82,7 +85,7 @@ public class TConstructRegistry
{
Item ret = itemDirectory.get(name);
if (ret == null)
System.out.println("[TCon API] Could not find " + name + " in the Item directory");
logger.warning("Could not find " + name + " in the Item directory");
return ret;
}
@@ -113,7 +116,7 @@ public class TConstructRegistry
{
ItemStack add = itemstackDirectory.get(name);
if (add != null)
System.out.println("[TCon API] " + name + " is already present in the ItemStack directory");
logger.warning(name + " is already present in the ItemStack directory");
itemstackDirectory.put(name, itemstack);
}
@@ -128,7 +131,7 @@ public class TConstructRegistry
{
ItemStack ret = itemstackDirectory.get(name);
if (ret == null)
System.out.println("[TCon API] Could not find " + name + " in the ItemStack directory");
logger.warning("Could not find " + name + " in the ItemStack directory");
return ret;
}
@@ -197,7 +200,7 @@ public class TConstructRegistry
{
ToolBuilder tb = ToolBuilder.instance;
if (parts.length < 1 || parts.length > 4 || parts.length == 3)
System.out.println("[TCon API] Wrong amount of items to craft into a tool");
logger.warning("Wrong amount of items to craft into a tool");
tb.addToolRecipe(output, parts);
}
@@ -446,7 +449,7 @@ public class TConstructRegistry
}
catch (Exception e)
{
System.out.println("[TCon API] Could not find casting table recipes.");
logger.warning("Could not find casting table recipes.");
return null;
}
}
@@ -467,7 +470,7 @@ public class TConstructRegistry
}
catch (Exception e)
{
System.out.println("[TCon API] Could not find casting basin recipes.");
logger.warning("Could not find casting basin recipes.");
return null;
}
}
@@ -488,7 +491,7 @@ public class TConstructRegistry
}
catch (Exception e)
{
System.out.println("[TCon API] Could not find chisel detailing recipes.");
logger.warning("Could not find chisel detailing recipes.");
return null;
}
}