- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 04 Sep 2009 12:30:14 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/src/org/w3c/unicorn In directory hutz:/tmp/cvs-serv29292/src/org/w3c/unicorn Modified Files: Framework.java Log Message: log4j now uses an xml properties file Index: Framework.java =================================================================== RCS file: /sources/public/2006/unicorn/src/org/w3c/unicorn/Framework.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Framework.java 2 Sep 2009 10:39:15 -0000 1.8 +++ Framework.java 4 Sep 2009 12:30:12 -0000 1.9 @@ -25,6 +25,7 @@ import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.log4j.PropertyConfigurator; +import org.apache.log4j.xml.DOMConfigurator; import org.apache.velocity.VelocityContext; import org.apache.velocity.app.Velocity; import org.apache.velocity.app.VelocityEngine; @@ -146,21 +147,25 @@ } // Log4j initialization attempt - String log4jPath = unicornHome.getPath() + "/WEB-INF/conf/log4j.properties"; - try { - loadConfigFile(log4jPath, true); - PropertyConfigurator.configure(unicornPropertiesFiles.get("log4j.properties")); + //String log4jPath = unicornHome.getPath() + "/WEB-INF/conf/log4j.properties"; + String log4jPath = unicornHome.getPath() + "/WEB-INF/conf/log4j.xml"; + //try { + //loadConfigFile(log4jPath, true); + //PropertyConfigurator.configure(unicornPropertiesFiles.get("log4j.properties")); + DOMConfigurator.configure(log4jPath); logger.info("OK - JVM parameter \"unicorn.home\" was found: " + unicornHome.getPath()); logger.info("OK - Log4j successfully initialized"); logger.debug("> Used log4j.properties file: " + log4jPath); + + //logger.debug("> Used log4j.properties file: " + log4jPath); //logger.debug("> log4j.properties:" + (UCNProperties) unicornPropertiesFiles.get("log4j.properties")); // already logged by loadConfigFile() - } catch (FileNotFoundException e) { + /*} catch (FileNotFoundException e) { logger.warn("Log4j config file \"log4j.properties\" could not be found: " + log4jPath); logger.warn("Log4j will not be initialized"); } catch (IOException e) { logger.error("Error reading \"log4j.properties\": ", e); logger.warn("Log4j will not be initialized"); - } + }*/ } public static void initConfig() throws InitializationFailedException {
Received on Friday, 4 September 2009 12:30:23 UTC