package com.choonster.testmod3;


import org.apache.logging.log4j.Level;
import org.apache.logging.log4j.Marker;
import org.apache.logging.log4j.MarkerManager;

public class Logger {
	public static final Marker MOD_MARKER = MarkerManager.getMarker(TestMod3.MODID);

	private static org.apache.logging.log4j.Logger logger;

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

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

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

	public static void log(Level level, Marker marker, Throwable throwable, String format, Object... data) {
		logger.log(level, marker, String.format(format, data), throwable);
	}

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

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

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

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

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

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

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

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

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

	public static void warn(Marker marker, String format, Object... data) {
		log(Level.WARN, marker, format, data);
	}

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

	public static void info(Marker marker, String format, Object... data) {
		log(Level.INFO, marker, format, data);
	}

	public static void info(Throwable throwable, String format,
							Object... data) {
		log(Level.INFO, throwable, format, data);
	}

	public static void info(Marker marker, Throwable throwable, String format,
							Object... data) {
		log(Level.INFO, marker, throwable, format, data);
	}

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

	public static void debug(Marker marker, String format, Object... data) {
		log(Level.DEBUG, marker, format, data);
	}

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

		Logger.logger = logger;
	}


}

@@ -391,35 +391,38 @@
  %7B%0A%09%09logger.
-log
+printf
 (level, 
 String.forma
@@ -405,38 +405,24 @@
 intf(level, 
-String.format(
 format, data
@@ -414,33 +414,32 @@
 l, format, data)
-)
 ;%0A%09%7D%0A%0A%09public st
@@ -670,35 +670,38 @@
 ata) %7B%0A%09%09logger.
-log
+printf
 (level, marker, 
@@ -696,38 +696,24 @@
 el, marker, 
-String.format(
 format, data
@@ -713,17 +713,16 @@
 t, data)
-)
 ;%0A%09%7D%0A%0A%09p

Use Logger#printf where possible