Remove any handlers with an attribute of debug_only that is True and
        remove the references to said handlers from any loggers that are
        referencing them.
195045
def _remove_debug_handlers(self):
        
        remove = list()
        for handler in self.config[self.HANDLERS]:
            if self.config[self.HANDLERS][handler].get('debug_only'):
                remove.append(handler)
        for handler in remove:
            del self.config[self.HANDLERS][handler]
            for logger in self.config[self.LOGGERS].keys():
                logger = self.config[self.LOGGERS][logger]
                if handler in logger[self.HANDLERS]:
                    logger[self.HANDLERS].remove(handler)
        self._remove_debug_only()
1365087
public static void safelyRemoveHandlers(ChannelPipeline pipeline, String... handlerNames) {
        for (String name : handlerNames) {
            if (pipeline.get(name) != null) {
                pipeline.remove(name);
            } else {
                LOG.debug("Trying to remove not engaged {} handler from the pipeline", name);
            }
        }
    }
1011802
void clear() {

        // This is volatile, read once for performance.
        final String name = loggerName;
        if (name != null) {
            CHANGE_LOGGER_CONTEXT_LOCK.lock();
            try {
                loggerContext.stop();

                final Logger logger = loggerContext.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
                logger.detachAndStopAllAppenders();

                // Additional cleanup/reset for this name
                configureLoggers(name);
            } finally {
                CHANGE_LOGGER_CONTEXT_LOCK.unlock();
            }

            StatusPrinter.setPrintStream(System.out);
        }
    }
1302990
def __remove_temp_logging_handler():
    '''
    
    '''
    if is_logging_configured():
        # In this case, the temporary logging handler has been removed, return!
        return

    # This should already be done, but...
    __remove_null_logging_handler()

    root_logger = logging.getLogger()
    global LOGGING_TEMP_HANDLER

    for handler in root_logger.handlers:
        if handler is LOGGING_TEMP_HANDLER:
            root_logger.removeHandler(LOGGING_TEMP_HANDLER)
            # Redefine the null handler to None so it can be garbage collected
            LOGGING_TEMP_HANDLER = None
            break

    if sys.version_info >= (2, 7):
        # Python versions >= 2.7 allow warnings to be redirected to the logging
        # system now that it's configured. Let's enable it.
        logging.captureWarnings(True)
749586
def remove_event_handler(self, callback, event=None):
        
        found = 0
        if event and not isinstance(event, type):
            event = type(event)

        i = len(self._event_builders)
        while i:
            i -= 1
            ev, cb = self._event_builders[i]
            if cb == callback and (not event or isinstance(ev, event)):
                del self._event_builders[i]
                found += 1

        return found
1325439
public synchronized static void clearHandlers() {
      java.util.logging.Logger root = java.util.logging.LogManager.getLogManager().getLogger(StringUtils.EMPTY);
      Handler[] handlers = root.getHandlers();
      for (Handler h : handlers) {
         root.removeHandler(h);
      }
   }
936204
public void removeAllAppenders() {
        ListIterator<Appender> ite = appenderList.listIterator();
        while (ite.hasNext()) {
            Appender appender = ite.next();
            if (appender != null && appender.isLogOpen()) {
                try {
                    appender.close();
                } catch (IOException e) {
                    Log.e(TAG, "Failed to close appender. " + e);
                }
            }
        }
        appenderList.clear();
    }
1319874
def remove_logging_handler(handler, logger=None):
    

    logger = LOGGER if logger is None else logger
    logger.handlers and LOGGER.debug("> Stopping handler: '{0}'.".format(handler))
    logger.removeHandler(handler)
    return True
849176
def clear_signal_handlers(self):
        '''

        '''
        signal.signal(signal.SIGABRT, self.old_sigabrt)
        signal.signal(signal.SIGINT, self.old_sigint)
        signal.signal(signal.SIGPIPE, self.old_sigpipe)
        signal.signal(signal.SIGTERM, self.old_sigterm)
739384
public void removeHandler() {

        clearShowing();
        if (m_overHandlerRegistration != null) {
            m_overHandlerRegistration.removeHandler();
            m_overHandlerRegistration = null;
        }
        m_target = null;
    }
1152978
def clear(self):
        
        self._logger.debug("Component handlers are cleared")

        # Clean up everything to avoid stale references, ...
        self._field = None
        self._name = None
        self._logger = None
730740
def remove_all_listeners(self, event=None):
        
        if event is not None:
            self._registered_events[event] = OrderedDict()
        else:
            self._registered_events = defaultdict(OrderedDict)
523352
public void unsetLogHandler(String id, LogHandler ref) {
        if (id != null) {
            if (ref == null) {
                logHandlerServices.remove(id);
            } else {
                logHandlerServices.remove(id, ref);
            }
        }
    }
725243
def remove_signals_listeners(instance):
    
    if hasattr(instance, "__listeners__"):
        for listener in list(instance.__listeners__):
            for signal in instance.__listeners__[listener]:
                signal.disconnect(listener)
1167272
def remove_handlers_bound_to_instance(self, obj):
        
        for handler in self.handlers:
            if handler.im_self == obj:
                self -= handler
467570
def remove_handlers(logger):
    # TODO: Issue related to placeholder logger objects appearing in some rare cases. Check below
    # required as a workaround
    
    if hasattr(logger, "handlers"):
        for handler in logger.handlers[::-1]:
            try:
                if isinstance(handler, logging.FileHandler):
                    handler.close()
                logger.removeHandler(handler)
            except:  # pylint: disable=bare-except
                import traceback
                traceback.print_exc()
                break
236792
def remove_handler(self, name):
        ''' 
        '''
        index = None
        for i, h in enumerate(self.capture_handlers):
            if h['name'] == name:
                index = i

        if index is not None:
            self.capture_handlers[index]['logger'].close()
            del self.capture_handlers[index]