Removed Localization Stuff.
Added Logging Option. Logging of Exceptions is now done via AELogger
This commit is contained in:
+10
-12
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user