Skip to content
This repository has been archived by the owner on Mar 10, 2021. It is now read-only.

Commit

Permalink
Use corrent logger. I guess.
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Aug 13, 2014
1 parent 0027994 commit ed46f16
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
Expand Up @@ -71,6 +71,7 @@ public class IguanaTweaksTConstruct {

@EventHandler
public void preInit(FMLPreInitializationEvent event) {
Log.init(event.getModLog());
configPath = new File(event.getModConfigurationDirectory(), Reference.MOD_ID);
configPath.mkdirs();

Expand Down
12 changes: 9 additions & 3 deletions src/main/java/iguanaman/iguanatweakstconstruct/util/Log.java
Expand Up @@ -3,10 +3,16 @@
import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.Logger;

public class Log {
private static Logger logger = org.apache.logging.log4j.LogManager.getLogger("Iguana-TCon");
public abstract class Log {
// initialized by preinit
private static Logger logger;

public static void log(Level level, Object obj)
public static void init(Logger log)
{
logger = log;
}

public static void log(Level level, Object obj)
{
logger.log(level, String.valueOf(obj));
}
Expand Down

0 comments on commit ed46f16

Please sign in to comment.