package net.aeronica.mods.mxtune.util;

import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import net.aeronica.mods.mxtune.MXTuneMain;

/** TODO: This need to be reviewed - Use Forge's logger? */
public class ModLogger
{

    private static Logger modLogger;

    public static void initializeLogging()
    {
        modLogger = LogManager.getLogger(MXTuneMain.MODID);
    }

    public static void info(String msg)
    {
        modLogger.log(Level.INFO, msg);
    }

    public static void warning(String msg)
    {
        modLogger.log(Level.WARN, msg);
    }

    public static void error(String msg)
    {
        modLogger.log(Level.ERROR, msg);
    }

    public static void debug(String msg)
    {
        modLogger.log(Level.DEBUG, msg);
    }
}

package net.aeronica.mods.mxtune.util;

import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.Logger;

public class ModLogger {

    private static Logger logger;

    public static void setLogger(Logger logger) {
        if (ModLogger.logger != null) {
            throw new IllegalStateException("Attempt to replace logger");
        }
        ModLogger.logger = logger;
    }

    public static void log(Level level, String format, Object... data) {
        logger.printf(level, format, data);
    }

    public static void info(String format, Object... data){
        log(Level.INFO, format, data);
    }
    
    public static void debug(String format, Object... data){
        log(Level.DEBUG, format, data);
    }
    
    public static void warning(String format, Object... data){
        log(Level.WARN, format, data);
    }

    public static void error(String format, Object... data){
        log(Level.ERROR, format, data);
    }

    public static void fatal(String format, Object... data){
        log(Level.FATAL, format, data);
    }

}

Update ModLogger to allow use of string formats.