static void setLevel(final String loggerName, final String level) {
    Level log4jLevel = Level.toLevel(level, null);
    requireNonNull(log4jLevel);
    final LoggerContext loggerContext = getLoggerContext();
    if (Strings.isEmpty(loggerName)) {
      setRootLevel(loggerContext, log4jLevel);
    } else if (setLevel(loggerName, log4jLevel, loggerContext.getConfiguration())) {
      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