Example usage for org.apache.commons.configuration PropertiesConfiguration reload

List of usage examples for org.apache.commons.configuration PropertiesConfiguration reload

Introduction

In this page you can find the example usage for org.apache.commons.configuration PropertiesConfiguration reload.

Prototype

public void reload() 

Source Link

Document

Performs a reload operation if necessary.

Usage

From source file:com.cisco.oss.foundation.logging.FoundationLoggerConfiguration.java

private void initiateLog4jPropertiesFallback(Layout layout) {

    URL resource = this.getClass().getResource(DEFAULT_CONFIGURATION_FILE);
    if (resource != null) {
        try {/*from w w  w  . j a va2  s .co m*/
            PropertiesConfiguration.setDefaultListDelimiter('~');
            PropertiesConfiguration propertiesConfiguration = new PropertiesConfiguration(resource);
            propertiesConfiguration.setDelimiterParsingDisabled(true);
            propertiesConfiguration.reload();
            init(propertiesConfiguration, layout);
        } catch (Exception e) {
            System.err.println("ERROR: can't load log4j.properties: " + e.toString());
        }
    } else {
        System.err.println("can't load log4j.properties - not found in classpath");
    }

}