- From: Olivier Thereaux via cvs-syncmail <cvsmail@w3.org>
- Date: Tue, 03 Feb 2009 20:00:33 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2002/css-validator/org/w3c/css/index In directory hutz:/tmp/cvs-serv19517/org/w3c/css/index Modified Files: TranslationTableGenerator.java Log Message: fixing some velocity log-initialization snafu Index: TranslationTableGenerator.java =================================================================== RCS file: /sources/public/2002/css-validator/org/w3c/css/index/TranslationTableGenerator.java,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- TranslationTableGenerator.java 10 Dec 2008 15:25:52 -0000 1.8 +++ TranslationTableGenerator.java 3 Feb 2009 20:00:31 -0000 1.9 @@ -12,8 +12,11 @@ import java.io.OutputStreamWriter; import java.net.URI; import java.net.URISyntaxException; -import org.apache.velocity.VelocityContext; +import java.text.SimpleDateFormat; +import java.util.Date; + import org.apache.velocity.Template; +import org.apache.velocity.VelocityContext; import org.apache.velocity.app.Velocity; import org.apache.velocity.exception.MethodInvocationException; import org.apache.velocity.exception.ParseErrorException; @@ -49,14 +52,11 @@ // the velocity context used to generate the index // (NB: the same context is used for each index page, changing every thing // inside) + public static VelocityContext vc = new VelocityContext(); private static String html_files_path = "../../../../"; private static boolean done = false; - public static VelocityContext vc; private static String template_name = "translations.vm"; - static { - vc = new VelocityContext(); - } /** * @param args @@ -82,6 +82,10 @@ path = new URI(path).getPath(); Velocity.setProperty(Velocity.FILE_RESOURCE_LOADER_PATH, path); Velocity.addProperty(Velocity.FILE_RESOURCE_LOADER_PATH, path + "../css/"); + Velocity.setProperty(Velocity.RUNTIME_LOG, + "velocity-" + new SimpleDateFormat("yyyy-MM-dd_HHmm").format(new Date()) + ".log"); + + Velocity.setProperty(Velocity.RUNTIME_LOG_LOGSYSTEM_CLASS, "org.apache.velocity.runtime.log.AvalonLogChute"); Velocity.init(); Template tpl = Velocity.getTemplate(template_name, "UTF-8");
Received on Tuesday, 3 February 2009 20:00:44 UTC