code: public void setLoggerLevel(@Nonnull String loggerName, @Nullable String level) {
          logger.info("setLoggerLevel(" + loggerName + "," + level + ")");
          try {
              Level levelAsObject = Level.toLevel(level);
              LogManager.getLogger(loggerName).setLevel(levelAsObject);
          } catch (RuntimeException e) {
              logger.warn("Exception setting logger " + loggerName + " to level " + level, e);
              throw e;
          }
      }
docs: Set the level of the given logger.
  
  @param loggerName name of the logger to set
  @param level      new level. <code>null</code> or unknown level will set logger level to <code>null</code>
  @see Logger#setLevel(org.apache.log4j.Level)