@Test
  public void testSettingProtectedLogLevel() throws Exception {
    try {
      testDynamicLogLevel(LogLevel.PROTOCOL_HTTP, LogLevel.PROTOCOL_HTTP, true, protectedLogName,
        "DEBUG");
      fail("Expected IO exception due to protected logger");
    } catch (IOException e) {
      assertTrue(e.getMessage().contains("" + HttpServletResponse.SC_PRECONDITION_FAILED));
      assertTrue(e.getMessage().contains(
        "Modification of logger " + protectedLogName + " is disallowed in configuration."));
    }
  }
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