public synchronized Map<String, LoggerLevel> allLevels() {
        Map<String, LoggerLevel> result = new TreeMap<>();

        Enumeration<org.apache.log4j.Logger> enumeration = currentLoggers();
        Collections.list(enumeration)
                .stream()
                .filter(logger -> logger.getLevel() != null)
                .forEach(logger -> result.put(logger.getName(), loggerLevel(logger)));

        org.apache.log4j.Logger root = rootLogger();
        if (root.getLevel() != null) {
            result.put(ROOT_LOGGER_NAME, loggerLevel(root));
        }

        return result;
    }
Retrieve the current levels of all known loggers
@return the levels of all known loggers; may be empty, but never null
connect/runtime/src/main/java/org/apache/kafka/connect/runtime/Loggers.java