static void setLevel(final String parentLogger, final String level) {
    try {
      // ensure we have at least one log context, to load configs
      LoggerFactory.getLogger(LogConfigurator.class);
      Log4j2ConfiguratorUtil.setAllLevels(parentLogger, level);
    } catch (NoClassDefFoundError | ClassCastException | NoSuchElementException e) {
      // This is expected when Log4j support is not in the classpath, so ignore
    }
  }
Sets level to specified logger.

@param parentLogger the logger name
@param level the level
util/src/main/java/org/hyperledger/besu/util/LogConfigurator.java