URL url = Log4jWebConfigurerTests.class.getResource(TESTLOG4J_PROPERTIES);
initLogging(url.getFile(), true);
}
private void initLogging(String location, boolean refreshInterval) {
MockServletContext sc = new MockServletContext("", new FileSystemResourceLoader());
sc.addInitParameter(Log4jWebConfigurer.CONFIG_LOCATION_PARAM, location);
if (refreshInterval) {
sc.addInitParameter(Log4jWebConfigurer.REFRESH_INTERVAL_PARAM, "10");
}
Log4jWebConfigurer.initLogging(sc);