ServletContext context = sce.getServletContext();
String realPath = context.getRealPath("/");
String fileSep = System.getProperty("file.separator" );
if (realPath != null && (! realPath.endsWith(fileSep)))
realPath = realPath + fileSep;
//Initialize logger here:
PropertyConfigurator.configure(realPath + "WEB-INF/classes/" + context.getInitParameter("logger-config"));
log = Logger.getLogger(ContextLogger.class);
String name = context.getServletContextName();
//log request about servlet context being initialized
log.info("ServletContext ready: " + (name == null ? "" : name ));