public static void configLogger(String value) {
        List<Pair<String, Level>> options = List.of(
            Pair.of("debug", Level.DEBUG),
            Pair.of("info", Level.INFO),
            Pair.of("warn", Level.WARN),
            Pair.of("trace", Level.TRACE),
            Pair.of("off", Level.OFF),
            Pair.of("error", Level.ERROR));
        Pair<String, Level> option = options.get(0);
        int i = 1;
        while (i < options.size() && !option.getLeft().equalsIgnoreCase(value))
            option = options.get(i++);
        if (i < options.size()) {
            Logger rootLogger = (Logger) LoggerFactory.getLogger(org.slf4j.Logger.ROOT_LOGGER_NAME);
            rootLogger.setLevel(option.getRight());
        }
    }
Log the config parameter. If the counter is less than the number of available
options then it means that the user entered an option

@param value The config string
webmagic-scripts/src/main/java/us/codecraft/webmagic/scripts/config/ConfigLogger.java