public void maybeAddOfflineLogDir(String logDir, String msg, IOException e) {
        log.error(msg, e);
        if (offlineLogDirs.putIfAbsent(logDir, logDir) == null) {
            offlineLogDirQueue.add(logDir);
        }
    }
If the given logDir is not already offline, add it to the
set of offline log dirs and enqueue it to the logDirFailureEvent queue.

@param logDir The offline logDir.
@param msg Error message.
@param e Exception instance.
storage/src/main/java/org/apache/kafka/storage/internals/log/LogDirFailureChannel.java