TFM-4.3-Reloaded/src/me/StevenLawson/TotalFreedomMod/TFM_Log.java
Steven Lawson fce0ca3498 Added TFM_Log class to organize logging. !!STILL UNSTABLE!!
Will complete JeromSar merge next commit, using these loggers.
2012-09-15 13:01:43 -04:00

55 lines
1.2 KiB
Java

package me.StevenLawson.TotalFreedomMod;
import java.util.logging.Level;
import java.util.logging.Logger;
public class TFM_Log
{
private static final Logger logger = Logger.getLogger("Minecraft");
private TFM_Log()
{
throw new AssertionError();
}
private static void log(Level level, String message, boolean raw)
{
logger.log(level, (raw ? "" : "[" + TotalFreedomMod.pluginName + "]: ") + message);
}
public static void info(String message)
{
TFM_Log.info(message, false);
}
public static void info(String message, boolean raw)
{
TFM_Log.log(Level.INFO, message, raw);
}
public static void warning(String message)
{
TFM_Log.info(message, false);
}
public static void warning(String message, boolean raw)
{
TFM_Log.log(Level.WARNING, message, raw);
}
public static void severe(String message)
{
TFM_Log.info(message, false);
}
public static void severe(String message, boolean raw)
{
TFM_Log.log(Level.SEVERE, message, raw);
}
public static void severe(Throwable ex)
{
logger.log(Level.SEVERE, null, ex);
}
}