add log attribute to ant task and "stringUtils" to context
----------------------------------------------------------
Key: VELOCITY-417
URL: http://issues.apache.org/jira/browse/VELOCITY-417
Project: Velocity
Type: Improvement
Components: Texen
Reporter: sebastian
logging.patch: adds a "logFile" attribute
--- src/java/org/apache/velocity/texen/ant/TexenTask.java.orig Thu Oct 20
15:12:22 2005
+++ src/java/org/apache/velocity/texen/ant/TexenTask.java Thu Oct 20
15:55:07 2005
@@ -21,6 +21,7 @@
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
+import java.util.Properties;
import java.io.File;
import java.io.Writer;
@@ -136,6 +137,12 @@
protected boolean useClasspath;
/**
+ * The LogFile (incl. path) to log to.
+ */
+ protected String logFile;
+
+
+ /**
* Path separator.
*/
private String fileSeparator = System.getProperty("file.separator");
@@ -253,6 +260,22 @@
}
/**
+ * Sets the log file.
+ */
+ public void setLogFile(String log)
+ {
+ this.logFile = log;
+ }
+
+ /**
+ * Gets the log file.
+ */
+ public String getLogFile()
+ {
+ return this.logFile;
+ }
+
+ /**
* Set the context properties that will be
* fed into the initial context be the
* generating process starts.
@@ -413,6 +436,11 @@
ve.setProperty(
"classpath." + VelocityEngine.RESOURCE_LOADER +
".modificationCheckInterval", "2");
+ }
+
+ if (this.logFile != null)
+ {
+ ve.setProperty(ve.RUNTIME_LOG, this.logFile);
}
ve.init();
stringUtils.patch: adds a stringutils obj to the context
--- src/java/org/apache/velocity/texen/ant/TexenTask.java.orig Wed Apr 14
14:26:42 2004
+++ src/java/org/apache/velocity/texen/ant/TexenTask.java Thu Oct 20
15:09:03 2005
@@ -568,6 +568,7 @@
throws Exception
{
context.put("now", new Date().toString());
+ context.put("stringUtils", new StringUtils());
}
/**
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]