code: @Override
      public void addAppender(Appender newAppender) {
          // Null values for newAppender parameter are strictly forbidden.
          if (newAppender == null) {
              return;
          }
          // If the appender is already there, add this one to the end before
          // removing the
          // previous one
          boolean isAppenderPresent = appenderList.contains(newAppender);
          String appenderName = newAppender.getName() != null ? newAppender.getName(): "default";
          if (isAppenderPresent) {
              appenderList.add(newAppender);
              for (Iterator<Appender> it = appenderList.iterator(); it.hasNext();) {
                  Appender appender = it.next();
                  if (newAppender.equals(appender)) {
                      configuredAppenderList.add(appenderName);
                      it.remove();
                      appender.close();
                      return;
                  }
              }
          } else {
              appenderList.add(newAppender);
          }
          configuredAppenderList.add(appenderName);
      }
docs: /*
  (non-Javadoc)
  
  @see
  org.apache.log4j.helpers.AppenderAttachableImpl#addAppender(org.apache
  .log4j.Appender)