Created
July 8, 2015 15:36
-
-
Save TheXFactor117/14aa9ce6743268eea104 to your computer and use it in GitHub Desktop.
LogHelper class example.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.logging.log4j.Level; | |
import com.thexfactor117.ce.Reference; | |
import cpw.mods.fml.common.FMLLog; | |
public class LogHelper | |
{ | |
public static void log(Level logLevel, Object object){FMLLog.log(Reference.NAME, logLevel, String.valueOf(object));} | |
public static void all(Object object) {log(Level.ALL, object);} | |
public static void debug(Object object){log(Level.DEBUG, object);} | |
public static void error(Object object){log(Level.ERROR, object);} | |
public static void fatal(Object object){log(Level.FATAL, object);} | |
public static void info(Object object){log(Level.INFO, object);} | |
public static void off(Object object){log(Level.OFF, object);} | |
public static void trace(Object object){log(Level.TRACE, object);} | |
public static void warn(Object object){log(Level.WARN, object);} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment