private void addConsoleAppender(String appenderName, String level) {
    if ((config.getLoggerName() == null) || (config.getLoggerName().equals("log4j"))) {
      ConsoleAppender consoleAppndr = (ConsoleAppender)Logger.getRootLogger().getAppender(appenderName);
      if (consoleAppndr == null) {
        consoleAppndr = new ConsoleAppender(new PatternLayout(getPattern()));
        consoleAppndr.setName(appenderName);
        consoleAppndr.setThreshold(Level.toLevel(level)); //Level.ALL
        Logger.getRootLogger().addAppender(consoleAppndr);
        appenders.add(appenderName);
      }
    }
    else {
      throw new IllegalArgumentException("Logger " + config.getLoggerName() + " is not suppoted.");
    }
  }