closes all reopen loggers
976790
public synchronized void close() {
      Map<String, IDataLogger> copiedLoggers = new HashMap<String, IDataLogger>(this.openLoggers);

        for (IDataLogger dataLogger : copiedLoggers.values()) {
            try {
                dataLogger.close();
            } catch (Exception e) { }
        }
        this.openLoggers.clear();

    }
1134923
public static void close(
		final Collection<MasterTriggerRestoreHook<?>> hooks,
		final Logger log) throws FlinkException {

		for (MasterTriggerRestoreHook<?> hook : hooks) {
			try {
				hook.close();
			}
			catch (Throwable t) {
				log.warn("Failed to cleanly close a checkpoint master hook (" + hook.getIdentifier() + ")", t);
			}
		}
	}
927134
def close
      threads = @mutex.synchronize do
        raise Airbrake::Error, 'attempted to close already closed sender' if closed?

        unless @unsent.empty?
          msg = "#{LOG_LABEL} waiting to send #{@unsent.size} unsent notice(s)..."
          logger.debug(msg + ' (Ctrl-C to abort)')
        end

        @config.workers.times { @unsent << [:stop, Airbrake::Promise.new] }
        @closed = true
        @workers.list.dup
      end

      threads.each(&:join)
      logger.debug("#{LOG_LABEL} closed")
    end
1045171
def close(self):
        """"""
        self.flush()
        self.stream.close()
        logging.StreamHandler.close(self)
818534
def close(self):
        """"""
        with self._lock:
            for server in self._servers.values():
                server.close()

            # Mark all servers Unknown.
            self._description = self._description.reset()
            self._update_servers()
            self._opened = False

        # Publish only after releasing the lock.
        if self._publish_tp:
            self._events.put((self._listeners.publish_topology_closed,
                              (self._topology_id,)))
        if self._publish_server or self._publish_tp:
            self.__events_executor.close()
59041
def close(self):
        """"""
        # Give time to flush data if debug was on
        if self.debug:
            time.sleep(10)

        # Terminate workers
        for host in self.workers:
            host.close()

        # Terminate the brokers
        for broker in self.brokers:
            try:
                broker.close()
            except AttributeError:
                # Broker was not started (probably mislaunched)
                pass

        scoop.logger.info('Finished cleaning spawned subprocesses.')
85531
private void closeLogStream()
  {
    try {
      WriteStream os = _os;
      _os = null;

      if (os != null)
        os.close();
    } catch (Throwable e) {
      // can't log in log routines
    }

    try {
      WriteStream zipOut = _zipOut;
      _zipOut = null;

      if (zipOut != null)
        zipOut.close();
    } catch (Throwable e) {
      // can't log in log routines
    }
  }
1138791
public synchronized void close() throws IOException {
        if (logStream != null) {
            logStream.close();
        }
        for (FileOutputStream log : streamsToFlush) {
            log.close();
        }
    }
195125
public function close()
    {
        $this->writeToLog('============================================', true);
        $this->writeToLog('Log Closed: ' . DateTimeObj::get('c'), true);
        $this->writeToLog("============================================" . PHP_EOL . PHP_EOL, true);
    }
1170807
public void close() {
        Collection<WriterPoolMember> writers = drainAllWriters();
        for (WriterPoolMember writer: writers) {
            try {
                destroyWriter(writer);
            } catch (IOException e) {
                logger.log(Level.WARNING,"problem closing writer",e); 
            }
        }
    }
925120
public void closeLogger(String loggerName) {
        if (this.openLoggers.containsKey(loggerName)) {
            try {
                this.openLoggers.get(loggerName).close();
            } catch (Exception e) {
                throw new DelegatedRuntimeException(e);
            }
            this.openLoggers.remove(loggerName);
        }
    }
360080
def remove_file_handlers(logger=None):
    
    if not isinstance(logger, logging.Logger):
        logger = logging.getLogger(logger)

    new_handlers = []
    for handler in logger.handlers:
        if isinstance(handler, logging.FileHandler):
            handler.close()
        else:
            new_handlers.append(handler)
    logger.handlers = new_handlers
1035707
def closeLog(self):
        
        self._logPtr.close()
        if self._namePtr:
            self._namePtr.close()
        self.log = 0
31043
def cleanup_logger(self):
        
        self.log_handler.close()
        self.log.removeHandler(self.log_handler)
1254846
static void closeAllStreams(Iterable<EditLogInputStream> streams) {
    for (EditLogInputStream s : streams) {
      IOUtils.closeStream(s);
    }
  }
462862
@Override
    public void close() {
        if (!this.closed.getAndSet(true)) {
            this.metricReporter.cancel(true);
            this.metrics.close();
            this.rolloverProcessor.close();
            this.writeProcessor.close();

            // Close active ledger.
            WriteLedger writeLedger;
            synchronized (this.lock) {
                writeLedger = this.writeLedger;
                this.writeLedger = null;
                this.logMetadata = null;
            }

            // Close the write queue and cancel the pending writes.
            this.writes.close().forEach(w -> w.fail(new CancellationException("BookKeeperLog has been closed."), true));

            if (writeLedger != null) {
                try {
                    Ledgers.close(writeLedger.ledger);
                } catch (DurableDataLogException bkEx) {
                    log.error("{}: Unable to close LedgerHandle for Ledger {}.", this.traceObjectId, writeLedger.ledger.getId(), bkEx);
                }
            }

            log.info("{}: Closed.", this.traceObjectId);
        }
    }
186627
private void cleanup() {
        long traceId = LoggerHelpers.traceEnterWithContext(log, this.traceObjectId, "cleanup");
        val toRemove = this.processors.values().stream()
                                      .map(this::closeIfNecessary)
                                      .filter(ProcessorCollection::isClosed)
                                      .map(ProcessorCollection::getId)
                                      .collect(Collectors.toList());
        toRemove.forEach(this.processors::remove);
        LoggerHelpers.traceLeave(log, this.traceObjectId, "cleanup", traceId, toRemove.size());
    }