/*
(non-Javadoc)

@see org.apache.log4j.Category#removeAppender(org.apache.log4j.Appender)
344290
@Override
    public void removeAppender(Appender appender) {
        if (appender == null || aai == null) {
            return;
        }
        boolean wasAttached = aai.isAttached(appender);
        aai.removeAppender(appender);
        if (wasAttached) {
            fireRemoveAppenderEvent(appender);
        }
    }
519625
public void removeAllAppenders() {
        for (Appender appender : aai.getAppenders()) {
            aai.removeAppender(appender);
            fireRemoveAppenderEvent(appender);
        }
    }
681915
synchronized public void addAppender(Appender appender) throws IllegalArgumentException {
        if (appender == null) {
            throw new IllegalArgumentException("Appender not allowed to be null");
        }

        for (Appender p : appenderList) {
            if (p.getClass() == appender.getClass())
                return;
        }
        appenderList.add(appender);
    }
1133183
public void remove() {
        if(_mapIterator == null)
            throw new UnsupportedOperationException(Bundle.getErrorString("IteratorFactory_Iterator_removeUnsupported", new Object[]{this.getClass().getName()}));
        else _mapIterator.remove();
    }
766503
public void removeChunkedMessageWrapper(long wrapperId)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.entry(this, tc, "removeChunkedMessageWrapper", Long.valueOf(wrapperId));
        inProgressMessages.remove(Long.valueOf(wrapperId));
        if (TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled())
            SibTr.exit(this, tc, "removeChunkedMessageWrapper");
    }
171730
public function addAppender( common_log_Appender $appender)
    {
        
        $this->appenders[] = $appender;
        if (is_null($this->minLevel) || $this->minLevel > $appender->getLogThreshold()) {
        	$this->minLevel = $appender->getLogThreshold();
        }
        
    }
754261
@Override
  protected void subAppend(LoggingEvent event) {
    super.subAppend(event);
    // That should've gone into our writer. Notify the LogContext.
    String logOutput = writer.toString();
    writer.reset();

    OperationLog log = operationManager.getOperationLogByThread();
    if (log == null) {
      LOG.debug(" ---+++=== Dropped log event from thread " + event.getThreadName());
      return;
    }
    log.writeOperationLog(logOutput);
  }
651835
public synchronized void removeObserver(final ApptentiveNotificationObserver observer) {
		for (ApptentiveNotificationObserverList observers : observerListLookup.values()) {
			observers.removeObserver(observer);
		}
	}
1312392
public static synchronized void removeLogger(@NonNull JobLogger logger) {
        for (int i = 0; i < loggers.length; i++) {
            if (logger.equals(loggers[i])) {
                loggers[i] = null;
                // continue, maybe for some reason the logger is twice in the array
            }
        }
    }
1111311
public static function add(\n2n\log4php\LoggerAppender $appender) {
		$name = $appender->getName();
		
		if(empty($name)) {
			throw new \n2n\log4php\LoggerException('log4php: Cannot add unnamed appender to pool.', E_USER_WARNING);
			return;
		}
		
		if (isset(self::$appenders[$name])) {
			throw new \n2n\log4php\LoggerException("log4php: Appender [$name] already exists in pool. Overwriting existing appender.", E_USER_WARNING);
		}
		
		self::$appenders[$name] = $appender;
	}
1082951
protected void unregisterNotificationListeners(ClassLoaderLeakPreventor preventor, NotificationBroadcasterSupport mBean,
                                                 final Class<?> listenerWrapperClass) {
    final Field listenerListField = preventor.findField(NotificationBroadcasterSupport.class, "listenerList");
    if(listenerListField != null) {
      final Class<?> listenerInfoClass = preventor.findClass("javax.management.NotificationBroadcasterSupport$ListenerInfo");

      final List<? /*javax.management.NotificationBroadcasterSupport.ListenerInfo*/> listenerList =
          preventor.getFieldValue(listenerListField, mBean);

      if(listenerList != null) {
        final Field listenerField = preventor.findField(listenerInfoClass, "listener");
        final Field filterField = preventor.findField(listenerInfoClass, "filter");
        final Field handbackField = preventor.findField(listenerInfoClass, "handback");
        for(Object listenerInfo : listenerList) {
          final NotificationListener listener = preventor.getFieldValue(listenerField, listenerInfo);
          final NotificationListener rawListener = unwrap(preventor, listenerWrapperClass, listener);
          final NotificationFilter filter = preventor.getFieldValue(filterField, listenerInfo);
          final Object handback = preventor.getFieldValue(handbackField, listenerInfo);
          
          if(preventor.isLoadedInClassLoader(rawListener) || preventor.isLoadedInClassLoader(filter) || preventor.isLoadedInClassLoader(handback)) {
            preventor.warn(((listener == rawListener) ? "Listener '" : "Wrapped listener '") + listener + 
                "' (or its filter or handback) of MBean " + mBean + 
                " was loaded in protected ClassLoader; removing");
            // This is safe, as the implementation works with a copy, not altering the original
            try {
              mBean.removeNotificationListener(listener, filter, handback);
            }
            catch (ListenerNotFoundException e) { // Should never happen
              preventor.error(e);
            }
          }
        }
      }
    }
  }
289806
@Override
    public void removeServiceListener(ServiceListener listener) {
        // Note: if unfiltered service listeners are implemented
        // This method needs to look for, and remove, the listener there
        // as well

        // Go through all of the filters, and for each filter
        // remove the listener from the filter's list.
        for(Entry<String, List<ServiceListener>> filteredList : filteredServiceListeners.entrySet()) {
            filteredList.getValue().remove(listener);
        }
    }
775076
public void removeLoggerRepositoryEventListener(
    final LoggerRepositoryEventListener listener) {
    synchronized (repositoryEventListeners) {
      if (!repositoryEventListeners.contains(listener)) {
        LogLog.warn(
          "Ignoring attempt to remove a "
                  + "non-registered LoggerRepositoryEventListener.");
      } else {
        repositoryEventListeners.remove(listener);
      }
    }
  }
1363912
public AddonChange removeAddon(String appName, String addonName) {
        return connection.execute(new AddonRemove(appName, addonName), apiKey);
    }
801428
public String setAppender(String appender) {
		int pipe = appender.indexOf('|');
		if(pipe>=0) {
			String rv;
			System.setProperty(
				"LOG4J_FILENAME_"+(rv=appender.substring(0,pipe)),
				root + appender.substring(pipe+1) + (printPID?('-' + pid):"") + ".log");
			return rv;
		} else {
			System.setProperty(
				"LOG4J_FILENAME_"+appender,
				root + appender + (printPID?('-' + pid):"") + ".log");
			return appender;
		}
		
	}
857412
def remove_receiver(self, receiver):
        
        if receiver in self.event_receivers:
            self.event_receivers.remove(receiver)
545169
private void cancelAppendTimer() {
    if (appendTimer != null) {
      LOGGER.trace("{} - Cancelling append timer", context.getCluster().member().address());
      appendTimer.cancel();
    }
  }