Removed Localization Stuff.

Added Logging Option.
Logging of Exceptions is now done via AELogger
This commit is contained in:
AlgorithmX2
2014-02-07 14:37:22 -06:00
parent e18dac1437
commit b57804be06
49 changed files with 212 additions and 195 deletions
+10 -12
View File
@@ -1,8 +1,8 @@
package appeng.core;
import java.io.File;
import java.util.logging.Level;
import appeng.core.features.AEFeature;
import appeng.util.Platform;
import cpw.mods.fml.relauncher.FMLRelaunchLog;
@@ -10,14 +10,16 @@ public class AELog
{
public static cpw.mods.fml.relauncher.FMLRelaunchLog instance = cpw.mods.fml.relauncher.FMLRelaunchLog.log;
public static net.minecraftforge.common.Configuration localizeation = new net.minecraftforge.common.Configuration( new File( "en_us.lang" ) );
private AELog() {
}
private static void log(Level level, String format, Object... data)
{
FMLRelaunchLog.log( "AE2:" + (Platform.isServer() ? "S" : "C"), level, format, data );
if ( Configuration.instance.isFeatureEnabled( AEFeature.Logging ) )
{
FMLRelaunchLog.log( "AE2:" + (Platform.isServer() ? "S" : "C"), level, format, data );
}
}
public static void severe(String format, Object... data)
@@ -40,16 +42,12 @@ public class AELog
log( Level.FINEST, "grinder: " + o );
}
public static void localization(String category, String unlocalizedName)
{
localizeation.get( category, unlocalizedName, unlocalizedName );
localizeation.save();
}
public static void error(Throwable e)
{
log( Level.SEVERE, "Error Occurred" );
e.printStackTrace();
if ( Configuration.instance.isFeatureEnabled( AEFeature.Logging ) )
{
severe( "Error: " + e.getMessage() );
e.printStackTrace();
}
}
}