package de.wwwu.awolf.presenter.util;


import org.apache.log4j.Logger;

public class Logging {
    private static Logger logger = Logger.getRootLogger();

    private Logging() {

    }

    public static void enableGuiLogging() {
        logger.addAppender(new GuiAppender());
    }

    private static Logger getLogger() {
        return logger;
    }

    public static void logInfo(final String message, Throwable throwable) {
        logger.info(message, throwable);
    }

    public static void logInfo(final String message) {
        logger.info(message);
    }

    public static void logDebug(final String message, Throwable throwable) {
        logger.debug(message, throwable);
    }

    public static void logDebug(final String message) {
        logger.debug(message);
    }

    public static void logWarning(final String message, Throwable throwable) {
        logger.warn(message, throwable);
    }

    public static void logWarning(final String message) {
        logger.warn(message);
    }

    public static void logError(final String message, Throwable throwable) {
        logger.error(message, throwable);
    }

    public static void logError(final String message) {
        logger.error(message);
    }
}
