@Override
    public void removeAllAppenders() {
        this.configuredAppenderList.clear();
        if (appenderList != null) {
            Iterator<Appender> it = appenderList.iterator();
            while (it.hasNext()) {
                Appender a = (Appender) it.next();
                String[] asyncAppenders = LoggingConfiguration.getInstance()
                .getConfiguration()
                .getAsyncAppenderImplementationNames();
                // For AsyncAppenders, we won't remove appenders.
                // This call is primarily made during dynamic log4 reconfiguration and we will
                // retain the ability to queue the messages.
                for (String asyncAppender : asyncAppenders) {
                    if (!(asyncAppender.equals(a.getClass().getName()))) {
                         it.remove();
                         a.close();
                    }
                }
            }
        }
    }
@ Override public void removeAllAppenders ( ) { this . configuredAppenderList . clear ( ) ; if ( appenderList != null ) { Iterator < Appender > it = appenderList . iterator ( ) ; while ( it . hasNext ( ) ) { Appender a = ( Appender ) it . next ( ) ; String [ ] asyncAppenders = LoggingConfiguration . getInstance ( ) . getConfiguration ( ) . getAsyncAppenderImplementationNames ( ) ; for ( String asyncAppender : asyncAppenders ) { if ( ! ( asyncAppender . equals ( a . getClass ( ) . getName ( ) ) ) ) { it . remove ( ) ; a . close ( ) ; } } } } }
/*
(non-Javadoc)

@see org.apache.log4j.helpers.AppenderAttachableImpl#removeAllAppenders()