package kr.pe.elex.examples;

import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;
import org.slf4j.Logger;
import org.slf4j.Marker;

@RequiredArgsConstructor
public abstract class AbstractLogger implements Logger {
	@Getter
	private final String name;
	@Getter
	@Setter
	private Level level = Level.INFO;

	protected abstract void log(String s);

	protected abstract void log(String s, Object o);

	protected abstract void log(String s, Object o1, Object o2);

	protected abstract void log(String s, Object... objects);

	protected abstract void log(String s, Throwable throwable);

	protected abstract void log(Marker marker, String s);

	protected abstract void log(Marker marker, String s, Object o);

	protected abstract void log(Marker marker, String s, Object o1, Object o2);

	protected abstract void log(Marker marker, String s, Object... objects);

	protected abstract void log(Marker marker, String s, Throwable throwable);

	@Override
	public boolean isTraceEnabled() {
		return Level.TRACE.ordinal() >= this.level.ordinal();
	}


	@Override
	public boolean isTraceEnabled(Marker marker) {
		return isTraceEnabled();
	}


	@Override
	public boolean isDebugEnabled() {
		return Level.DEBUG.ordinal() >= this.level.ordinal();
	}

	@Override
	public boolean isDebugEnabled(Marker marker) {
		return isDebugEnabled();
	}

	@Override
	public boolean isInfoEnabled() {
		return Level.INFO.ordinal() >= this.level.ordinal();
	}


	@Override
	public boolean isInfoEnabled(Marker marker) {
		return isInfoEnabled();
	}

	@Override
	public boolean isWarnEnabled() {
		return Level.WARN.ordinal() >= this.level.ordinal();
	}


	@Override
	public boolean isWarnEnabled(Marker marker) {
		return isWarnEnabled();
	}


	@Override
	public boolean isErrorEnabled() {
		return Level.ERROR.ordinal() >= this.level.ordinal();
	}


	@Override
	public boolean isErrorEnabled(Marker marker) {
		return isErrorEnabled();
	}

	@Override
	public void trace(String s) {
		log(s);
	}

	@Override
	public void trace(String s, Object o) {
		log(s, o);
	}

	@Override
	public void trace(String s, Object o, Object o1) {
		log(s, o, o1);
	}

	@Override
	public void trace(String s, Object... objects) {
		log(s, objects);
	}

	@Override
	public void trace(String s, Throwable throwable) {
		log(s, throwable);
	}

	@Override
	public void trace(Marker marker, String s) {
		log(marker, s);
	}

	@Override
	public void trace(Marker marker, String s, Object o) {
		log(marker, s, o);
	}

	@Override
	public void trace(Marker marker, String s, Object o, Object o1) {
		log(marker, s, o, o1);
	}

	@Override
	public void trace(Marker marker, String s, Object... objects) {
		log(marker, s, objects);
	}

	@Override
	public void trace(Marker marker, String s, Throwable throwable) {
		log(marker, s, throwable);
	}

	@Override
	public void debug(String s) {
		log(s);
	}

	@Override
	public void debug(String s, Object o) {
		log(s, o);
	}

	@Override
	public void debug(String s, Object o, Object o1) {
		log(s, o, o1);
	}

	@Override
	public void debug(String s, Object... objects) {
		log(s, objects);
	}

	@Override
	public void debug(String s, Throwable throwable) {
		log(s, throwable);
	}

	@Override
	public void debug(Marker marker, String s) {
		log(marker, s);
	}

	@Override
	public void debug(Marker marker, String s, Object o) {
		log(marker, s, o);
	}

	@Override
	public void debug(Marker marker, String s, Object o, Object o1) {
		log(marker, s, o, o1);
	}

	@Override
	public void debug(Marker marker, String s, Object... objects) {
		log(marker, s, objects);
	}

	@Override
	public void debug(Marker marker, String s, Throwable throwable) {
		log(marker, s, throwable);
	}


	@Override
	public void info(String s) {
		log(s);
	}

	@Override
	public void info(String s, Object o) {
		log(s, o);
	}

	@Override
	public void info(String s, Object o, Object o1) {
		log(s, o, o1);
	}

	@Override
	public void info(String s, Object... objects) {
		log(s, objects);
	}

	@Override
	public void info(String s, Throwable throwable) {
		log(s, throwable);
	}

	@Override
	public void info(Marker marker, String s) {
		log(marker, s);
	}

	@Override
	public void info(Marker marker, String s, Object o) {
		log(marker, s, o);
	}

	@Override
	public void info(Marker marker, String s, Object o, Object o1) {
		log(marker, s, o, o1);
	}

	@Override
	public void info(Marker marker, String s, Object... objects) {
		log(marker, s, objects);
	}

	@Override
	public void info(Marker marker, String s, Throwable throwable) {
		log(marker, s, throwable);
	}


	@Override
	public void warn(String s) {
		log(s);
	}

	@Override
	public void warn(String s, Object o) {
		log(s, o);
	}

	@Override
	public void warn(String s, Object o, Object o1) {
		log(s, o, o1);
	}

	@Override
	public void warn(String s, Object... objects) {
		log(s, objects);
	}

	@Override
	public void warn(String s, Throwable throwable) {
		log(s, throwable);
	}

	@Override
	public void warn(Marker marker, String s) {
		log(marker, s);
	}

	@Override
	public void warn(Marker marker, String s, Object o) {
		log(marker, s, o);
	}

	@Override
	public void warn(Marker marker, String s, Object o, Object o1) {
		log(marker, s, o, o1);
	}

	@Override
	public void warn(Marker marker, String s, Object... objects) {
		log(marker, s, objects);
	}

	@Override
	public void warn(Marker marker, String s, Throwable throwable) {
		log(marker, s, throwable);
	}


	@Override
	public void error(String s) {
		log(s);
	}

	@Override
	public void error(String s, Object o) {
		log(s, o);
	}

	@Override
	public void error(String s, Object o, Object o1) {
		log(s, o, o1);
	}

	@Override
	public void error(String s, Object... objects) {
		log(s, objects);
	}

	@Override
	public void error(String s, Throwable throwable) {
		log(s, throwable);
	}

	@Override
	public void error(Marker marker, String s) {
		log(marker, s);
	}

	@Override
	public void error(Marker marker, String s, Object o) {
		log(marker, s, o);
	}

	@Override
	public void error(Marker marker, String s, Object o, Object o1) {
		log(marker, s, o, o1);
	}

	@Override
	public void error(Marker marker, String s, Object... objects) {
		log(marker, s, objects);
	}

	@Override
	public void error(Marker marker, String s, Throwable throwable) {
		log(marker, s, throwable);
	}
}
