+ }
+
+ protected static void loadPropertyFile(Properties properties,
+ String propertyFile) {
+ FileInputStream in = null;
+ try {
+ in = new FileInputStream(propertyFile);
+ properties.load(in);
+ } catch (Exception e) {
+ throw new SlcException("Could not load proeprty file "
+ + propertyFile);
+ } finally {
+ IOUtils.closeQuietly(in);
+ }
+ }
+
+ private static void initLogging(Properties userProperties) {
+ System.setProperty("log4j.defaultInitOverride", "true");
+
+ // Add log4j user properties to System properties
+ for (Object obj : userProperties.keySet()) {
+ String key = obj.toString();
+ if (key.startsWith("log4j.")) {
+ System.setProperty(key, userProperties.getProperty(key));
+ }
+ }
+ Log4jUtils.initLog4j(System.getProperty("log4j.configuration",
+ "classpath:" + BOOTSTRAP_LOG4J_CONFIG));
+ log = LogFactory.getLog(SlcMain.class);
+
+ }