private static void cleanupLogger(Logger logger) {
    if (logger != null) {
      Handler[] handlers = logger.getHandlers();
      for (Handler handler : handlers) {
        handler.close();
        logger.removeHandler(handler);
      }
    }
  }
Removed all the handlers of the given {@link Logger} instance.

@param logger {@link Logger} to be cleaned up.
geode-gfsh/src/main/java/org/apache/geode/management/internal/cli/LogWrapper.java