private static Properties loadProperties()

in log4j-catalog/log4j-catalog-api/src/main/java/org/apache/logging/log4j/catalog/api/util/ProfileUtil.java [55:75]


    private static Properties loadProperties(ServletContext servletContext) {
        Properties props = new Properties();
        String env = System.getProperty("env");
        if (env == null) {
            env = System.getenv("env");
        }
        StringBuilder sb = new StringBuilder("catalog-");
        if (env != null) {
            sb.append(env);
        }
        sb.append("config.properties");
        InputStream is = ProfileUtil.class.getClassLoader().getResourceAsStream(sb.toString());
        if (is != null) {
            try {
                props.load(is);
            } catch (IOException ioe) {
                servletContext.log("Unable to load " + sb.toString() + ": " + ioe.getMessage());
            }
        }
        return props;
    }