private static void setRootLevel(final LoggerContext loggerContext, final Level level) {
    final LoggerConfig loggerConfig = loggerContext.getConfiguration().getRootLogger();
    if (!loggerConfig.getLevel().equals(level)) {
      loggerConfig.setLevel(level);
      loggerContext.updateLoggers();
    }
  }
Sets level to specified logger.

@param loggerName the logger name
@param level the level
util/src/main/java/org/hyperledger/besu/util/Log4j2ConfiguratorUtil.java