Given a level, remove a given logger function
            if it is a member of that level, closing the logger
            function either way.
329232
def remove(self, level, logger):
        
        self.config[level].discard(logger)
        logger.close()
104624
def close_log(log, verbose=True):
    

    if verbose:
        print('Closing log file:', log.name)

    # Send closing message.
    log.info('The log file has been closed.')

    # Remove all handlers from log.
    [log.removeHandler(handler) for handler in log.handlers]
436458
public void fireRemoveAppenderEvent(final Category logger,
                                        final Appender appender) {
       if (repo instanceof Hierarchy) {
           ((Hierarchy) repo).fireRemoveAppenderEvent(logger, appender);
       }
    }
1136811
@Override
    public void exiting(String sourceClass, String sourceMethod, Object result) {
        if (isLoggable(Level.FINER)) {
            Object params[] = { result };
            logp(Level.FINER, sourceClass, sourceMethod, "RETURN {0}", params);
        }
    }
562189
def logger_level=(level)
      logger.level = LOGGER_LEVEL[level] if LOGGER_LEVEL.key?(level)
      logger
    end
1018243
private void resetLogger(Logger logger) {
        // Close all the Logger's handlers.
        Handler[] targets = logger.getHandlers();
        for (int i = 0; i < targets.length; i++) {
            Handler h = targets[i];
            logger.removeHandler(h);
            try {
                h.close();
            } catch (Exception ex) {
                // Problems closing a handler?  Keep going...
            }
        }
        String name = logger.getName();
        if (name != null && name.equals("")) {
            // This is the root logger.
            logger.setLevel(defaultLevel);
        } else {
            logger.setLevel(null);
        }
    }
561899
def off(self, evnt, func):
        '''
        

        '''
        funcs = self._syn_funcs.get(evnt)
        if funcs is None:
            return

        try:
            funcs.remove(func)
        except ValueError:
            pass
938602
synchronized void closedLog(KCVSLog log) {
        KCVSLog l = openLogs.remove(log.getName());
        assert l==log;
    }
443006
public synchronized static void destroyInstance(SyslogIF syslog) throws SyslogRuntimeException {
        if (syslog == null) {
            return;
        }

        String protocol = syslog.getProtocol().toLowerCase();

        if (instances.containsKey(protocol)) {
            try {
                syslog.shutdown();

            } finally {
                instances.remove(protocol);
            }

        } else {
            throw new SyslogRuntimeException("Cannot destroy protocol \"%s\" instance; call shutdown instead", protocol);
        }
    }
1236928
public static void log(final Level level, final String message) {
		System.err.println("LOGGER " + level + ": " + message);
	}
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]
661877
def optimize_logger_level(logger, log_level):
    
    function_name = _log_functions[log_level]
    if getattr(logger, function_name) is _dummy_log:
        return False

    is_level_logged = logger.isEnabledFor(log_level)
    if not is_level_logged:
        setattr(logger, function_name, _dummy_log)

    return is_level_logged
421823
function endFunction(node) {
            const count = functionStack.pop();

            if (ignoreTopLevelFunctions && functionStack.length === 0) {
                topLevelFunctions.push({ node, count });
            } else {
                reportIfTooManyStatements(node, count, maxStatements);
            }
        }
694893
def disable_logger(logger_name: str, propagate: bool = False):
    """"""
    log = logging.getLogger(logger_name)
    log.propagate = propagate
    for handler in log.handlers:
        log.removeHandler(handler)
171280
void removeInlinedFunctions() {
    for (Map.Entry<String, FunctionState> entry : fns.entrySet()) {
      String name = entry.getKey();
      FunctionState functionState = entry.getValue();
      if (functionState.canRemove()) {
        Function fn = functionState.getFn();
        checkState(functionState.canInline());
        checkState(fn != null);
        verifyAllReferencesInlined(name, functionState);
        fn.remove();
        NodeUtil.markFunctionsDeleted(fn.getFunctionNode(), compiler);
      }
    }
  }
578950
def delete_log(self, log):
        ''''''
        if os.path.splitext(log)[-1] != '.log':
            raise Exception('File without .log was passed in for deletoin')
        with suppress(Exception):
            os.remove(log)
690594
public void setLoggerLevel(@Nonnull String loggerName, @Nullable String level) {
        logger.info("setLoggerLevel(" + loggerName + "," + level + ")");
        try {
            Level levelAsObject = Level.toLevel(level);
            LogManager.getLogger(loggerName).setLevel(levelAsObject);
        } catch (RuntimeException e) {
            logger.warn("Exception setting logger " + loggerName + " to level " + level, e);
            throw e;
        }
    }