|
@ -31,9 +31,9 @@ public class AppConfig { |
|
|
public static void configureApp() { |
|
|
public static void configureApp() { |
|
|
//configSimpleLogging(); |
|
|
//configSimpleLogging(); |
|
|
if (!configuredLogging) { |
|
|
if (!configuredLogging) { |
|
|
BasicConfigurator.configure(); |
|
|
|
|
|
|
|
|
configBasicLogging(); |
|
|
loadProperties(); |
|
|
loadProperties(); |
|
|
BasicConfigurator.resetConfiguration(); |
|
|
|
|
|
|
|
|
resetBasicLogging(); |
|
|
} else { |
|
|
} else { |
|
|
loadProperties(); |
|
|
loadProperties(); |
|
|
} |
|
|
} |
|
@ -41,6 +41,16 @@ public class AppConfig { |
|
|
configCache(); |
|
|
configCache(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void configBasicLogging() { |
|
|
|
|
|
BasicConfigurator.configure(); |
|
|
|
|
|
logger = LoggerFactory.getLogger(AppConfig.class); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public static void resetBasicLogging() { |
|
|
|
|
|
logger = null; |
|
|
|
|
|
BasicConfigurator.resetConfiguration(); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public static void configLogging(String location) { |
|
|
public static void configLogging(String location) { |
|
|
//Logging Config |
|
|
//Logging Config |
|
|
//remove previous configuration if it exists |
|
|
//remove previous configuration if it exists |
|
@ -114,7 +124,7 @@ public class AppConfig { |
|
|
PropertiesService.loadProperties(DEFAULTPROPERTIESFILE, null); |
|
|
PropertiesService.loadProperties(DEFAULTPROPERTIESFILE, null); |
|
|
} |
|
|
} |
|
|
loadedProperties = true; |
|
|
loadedProperties = true; |
|
|
logger.info("Loaded properties"); |
|
|
|
|
|
|
|
|
logger.info("Loaded Properties"); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|