private void setLevel(String protocol, String authority, String logName, String newLevel)
    throws Exception {
    String[] setLevelArgs = { "-setlevel", authority, logName, newLevel, "-protocol", protocol };
    CLI cli = new CLI(protocol.equalsIgnoreCase("https") ? sslConf : clientConf);
    cli.run(setLevelArgs);

    org.apache.logging.log4j.Logger logger = org.apache.logging.log4j.LogManager.getLogger(logName);

    assertEquals("new level not equal to expected: ", newLevel.toUpperCase(),
      logger.getLevel().toString());
  }
Run LogLevel command line to start a client to set log level of this test class to debug.
@param protocol  specify either http or https
@param authority daemon's web UI address
@throws Exception if unable to run or log level does not change as expected
hbase-http/src/test/java/org/apache/hadoop/hbase/http/log/TestLogLevel.java