public Properties getLog4jProperties() {
    if (!log4jProperties.isEmpty()) {
      return log4jProperties;
    }

    //Get log4j.properties file stream from classpath
    InputStream inputStream = Configuration.class.getClassLoader().getResourceAsStream(AMBARI_LOG_FILE);

    if (inputStream == null) {
      throw new RuntimeException(AMBARI_LOG_FILE + " not found in classpath");
    }

    // load the properties
    try {
      log4jProperties.load(inputStream);
      inputStream.close();
    } catch (FileNotFoundException fnf) {
      LOG.info("No configuration file " + AMBARI_LOG_FILE + " found in classpath.", fnf);
    } catch (IOException ie) {
      throw new IllegalArgumentException("Can't read configuration file " +
              AMBARI_LOG_FILE, ie);
    }

    return log4jProperties;
  }
Find, read, and parse the log4j.properties file.
@return the properties that were found or empty if no file was found
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java