Package io.lumify.core.util

Examples of io.lumify.core.util.LumifyLogger.info()


    private static Map<String, String> loadFile(final String fileName) throws IOException {
        LumifyLogger LOGGER = LumifyLoggerFactory.getLogger(FileConfigurationLoader.class);

        Map<String, String> results = new HashMap<String, String>();
        LOGGER.info("Loading config file: %s", fileName);
        FileInputStream in = new FileInputStream(fileName);
        try {
            Properties properties = new Properties();
            properties.load(in);
            for (Map.Entry<Object, Object> prop : properties.entrySet()) {
View Full Code Here


                String key = prop.getKey().toString();
                String value = prop.getValue().toString();
                results.put(key, value);
            }
        } catch (Exception e) {
            LOGGER.info("Could not load configuration file: %s", fileName);
        } finally {
            in.close();
        }
        return results;
    }
View Full Code Here

        if (log4jFile == null || !log4jFile.exists()) {
            throw new RuntimeException("Could not find log4j configuration at \"" + log4jFile + "\". Did you forget to copy \"docs/log4j.xml.sample\" to \"" + log4jFile + "\"");
        }
        DOMConfigurator.configure(log4jFile.getAbsolutePath());
        LumifyLogger logger = LumifyLoggerFactory.getLogger(LumifyLoggerFactory.class);
        logger.info("Using ConfigurationLoader: %s", this.getClass().getName());
        logger.info("Using log4j.xml: %s", log4jFile);
    }

    public abstract File resolveFileName(String fileName);
View Full Code Here

            throw new RuntimeException("Could not find log4j configuration at \"" + log4jFile + "\". Did you forget to copy \"docs/log4j.xml.sample\" to \"" + log4jFile + "\"");
        }
        DOMConfigurator.configure(log4jFile.getAbsolutePath());
        LumifyLogger logger = LumifyLoggerFactory.getLogger(LumifyLoggerFactory.class);
        logger.info("Using ConfigurationLoader: %s", this.getClass().getName());
        logger.info("Using log4j.xml: %s", log4jFile);
    }

    public abstract File resolveFileName(String fileName);

    protected Map getInitParameters() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.