private void configLog(String hiveLog4jTest, String hiveExecLog4jTest)
  throws Exception {
    String expectedLog4jTestPath = HiveTestUtils.getFileFromClasspath(hiveLog4jTest);
    String expectedLog4jExecPath = HiveTestUtils.getFileFromClasspath(hiveExecLog4jTest);
    System.setProperty(ConfVars.HIVE_LOG4J_FILE.varname, expectedLog4jTestPath);
    System.setProperty(ConfVars.HIVE_EXEC_LOG4J_FILE.varname, expectedLog4jExecPath);

    LogUtils.initHiveLog4j();

    HiveConf conf = new HiveConf();
    assertEquals(expectedLog4jTestPath, conf.getVar(ConfVars.HIVE_LOG4J_FILE));
    assertEquals(expectedLog4jExecPath, conf.getVar(ConfVars.HIVE_EXEC_LOG4J_FILE));
  }
TestHiveLogging

Test cases for HiveLogging, which is initialized in HiveConf.
Loads configuration files located in common/src/test/resources.
common/src/test/org/apache/hadoop/hive/conf/TestHiveLogging.java