private JsonObject readFileToJSON (String file) {

    // Read from File to String
    JsonObject jsonObject;

    try {
      JsonParser parser = new JsonParser();
      JsonElement jsonElement = parser.parse(new FileReader(file));
      jsonObject = jsonElement.getAsJsonObject();
    } catch (FileNotFoundException e) {
      throw new IllegalArgumentException("No file " + file, e);
    }

    return jsonObject;
  }
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