this is very similar to guava's {#link Closeables.closeQuietly()}, except with logging
unlike guava this swallows all Exceptions, not just IOExceptions. Error is still propagated.
@param closeable closeable to close
@param log logger to use
439736
public static void closeQuietly(@Nullable final Closeable closeable, @Nonnull final Logger log) {
        try {
            if (null != closeable) {
                closeable.close();
            }
        } catch (Exception e) {
            log.error("Exception during cleanup of a Closeable, ignoring", e);
        }
    }
1312253
private static void updateCloseable(boolean register,Closeable closeable)
    {
        boolean updated=false;
        synchronized(CloseableResourceManager.class)
        {
            if(register)
            {
                if(CloseableResourceManager.active)
                {
                    //update resources data structure
                    CloseableResourceManager.RESOURCES.add(closeable);
    
                    //set flag
                    updated=true;
                }
            }
            else
            {
                //update resources data structure
                CloseableResourceManager.RESOURCES.remove(closeable);

                //set flag
                updated=true;
            }
        }
        
        if(!updated)
        {
            throw new FaxException("Can not perform action, manager is being released.");
        }
    }
114415
public static void close(Closeable closeable) {
    if (closeable != null) {
      try {
        closeable.close();
      } catch (Exception e) {
        logger.info("Unable to close %s", closeable, e);
      }
    }
  }
1280645
private void closeQuietly(Closeable c) {
		if (c != null) {
			try {
				c.close();
			} catch (Throwable t) {
				logger.warn("Error closing, ignoring", t);
			}
		}
	}
938602
synchronized void closedLog(KCVSLog log) {
        KCVSLog l = openLogs.remove(log.getName());
        assert l==log;
    }
1221607
public static void closeQuietly(Closeable closeable) {
        try {
            if (closeable != null) {
                closeable.close();
            }
        } catch (IOException e) {
            LOGGER.log(Level.FINE, e.getMessage(), e);
        }
    }
871148
public static void closeResource(Closeable closeable) {
        if (closeable == null) {
            return;
        }
        try {
            closeable.close();
        } catch (IOException e) {
            Logger.getLogger(IOUtil.class).finest("closeResource failed", e);
        }
    }
302793
static void closeQuietly(MessageProducer producer) {
    InputStream message;
    while ((message = producer.next()) != null) {
      closeQuietly(message);
    }
  }
737271
@OnError
    public void onError(Throwable throwable) throws IOException {
        close(new CloseReason(throwable instanceof MessageTooBigException ?
                CloseCodes.TOO_BIG : CloseCodes.CLOSED_ABNORMALLY, throwable.getMessage()));
    }
1373394
public static void close(final AutoCloseable closeable)
    {
        try
        {
            if (null != closeable)
            {
                closeable.close();
            }
        }
        catch (final Exception e)
        {
            LangUtil.rethrowUnchecked(e);
        }
    }
1270250
public static void closeQuietly(Closeable closeable) {
        try {
            closeable.close();
        } catch (IOException e) {
            LOGGER.error("Could not close closable", e);
        }
    }
174199
public void close() {
    try {
      if (is != null) is.close();
    } catch (IOException e) {
      log.error(null, e);
      throw new RuntimeException(e);
    }
    isClosed = true;
  }
496716
public void close(AutoCloseable closeable) {
    try {
      closeable.close();
    } catch (Exception e) {
      throw new IllegalStateException("Fail to close " + closeable, e);
    }
  }
671233
private static void finalClose(final Closeable closeMe) {
        if (closeMe != null) {
            try {
                closeMe.close();
            } catch (IOException iox) {
                LOG.log(Level.FINEST, "Could not close: " + closeMe, iox);
            }
        }
    }
906587
public static void closeQuietly(final Connection connection)
    {
        if (connection != null) {
            try {
                connection.close();
            }
            catch (JMSException je) {
                if (je.getCause() instanceof InterruptedException) {
                    LOG.trace("ActiveMQ caught and wrapped InterruptedException");
                }
                if (je.getCause() instanceof InterruptedIOException) {
                    LOG.trace("ActiveMQ caught and wrapped InterruptedIOException");
                }
                else {
                    LOG.warnDebug(je, "While closing connection");
                }
            }
        }
    }
26942
public void close(final LogNode log) {
        if (!closed.getAndSet(true)) {
            if (inflaterRecycler != null) {
                inflaterRecycler.forceClose();
                inflaterRecycler = null;
            }
            if (moduleRefToModuleReaderProxyRecyclerMap != null) {
                try {
                    for (final Recycler<ModuleReaderProxy, IOException> recycler : //
                    moduleRefToModuleReaderProxyRecyclerMap.values()) {
                        recycler.forceClose();
                    }
                } catch (final InterruptedException e) {
                    interruptionChecker.interrupt();
                }
                moduleRefToModuleReaderProxyRecyclerMap.clear();
                moduleRefToModuleReaderProxyRecyclerMap = null;
            }
            if (zipFileSliceToLogicalZipFileMap != null) {
                zipFileSliceToLogicalZipFileMap.clear();
                zipFileSliceToLogicalZipFileMap = null;
            }
            if (nestedPathToLogicalZipFileAndPackageRootMap != null) {
                nestedPathToLogicalZipFileAndPackageRootMap.clear();
                nestedPathToLogicalZipFileAndPackageRootMap = null;
            }
            for (LogicalZipFile logicalZipFile; (logicalZipFile = allocatedLogicalZipFiles.poll()) != null;) {
                logicalZipFile.close();
            }
            if (canonicalFileToPhysicalZipFileMap != null) {
                try {
                    for (final PhysicalZipFile physicalZipFile : canonicalFileToPhysicalZipFileMap.values()) {
                        physicalZipFile.close();
                    }
                } catch (final InterruptedException e) {
                    interruptionChecker.interrupt();
                }
                canonicalFileToPhysicalZipFileMap.clear();
                canonicalFileToPhysicalZipFileMap = null;
            }
            if (additionalAllocatedPhysicalZipFiles != null) {
                for (PhysicalZipFile physicalZipFile; (physicalZipFile = additionalAllocatedPhysicalZipFiles
                        .poll()) != null;) {
                    physicalZipFile.close();
                }
                additionalAllocatedPhysicalZipFiles.clear();
                additionalAllocatedPhysicalZipFiles = null;
            }
            if (fastZipEntryToZipFileSliceMap != null) {
                fastZipEntryToZipFileSliceMap.clear();
                fastZipEntryToZipFileSliceMap = null;
            }
            // Temp files have to be deleted last, after all PhysicalZipFiles are closed
            if (tempFiles != null) {
                final LogNode rmLog = tempFiles.isEmpty() || log == null ? null
                        : log.log("Removing temporary files");
                while (!tempFiles.isEmpty()) {
                    final File tempFile = tempFiles.removeLast();
                    try {
                        Files.delete(tempFile.toPath());
                    } catch (final IOException | SecurityException e) {
                        if (rmLog != null) {
                            rmLog.log("Removing temporary file failed: " + e);
                        }
                    }
                }
                tempFiles.clear();
                tempFiles = null;
            }
        }
    }
203108
public static void cleanup(Log log, java.io.Closeable... closeables) {
    for(java.io.Closeable c : closeables) {
      if (c != null) {
        try {
          c.close();
        } catch(IOException e) {
          if (log != null && log.isDebugEnabled()) {
            log.debug("Exception in closing " + c, e);
          }
        }
      }
    }
  }