public void log(int level, String message, Object... replacements) {
        if (level < loggingMode)
            return;
        for (Object replace : replacements)
            message = message.replaceFirst("\\{\\}", replace.toString());
        String lvlMessage = "";
        switch (level) {
            case 0:
                lvlMessage = "TRACE";
                break;
            case 1:
                lvlMessage = "DEBUG";
                break;
            case 2:
                lvlMessage = "WARN";
                break;
            case 3:
                lvlMessage = "INFO";
                break;
        }
        String msg = lvlMessage + ": " + message;
        if (lvlMessage.equals("TRACE"))
            logger.info(message);
        outputList.add(msg);
    }