I'm not sure whether this is more Ant or Log4j, so please send me along
if I'm not in the right place.
In build.xml, I have this:
<target name="props-dev" depends="copy-props">
<replace file="${propsdir}/log4j.properties"
token="@logFileName@"
value="${env.TOMCAT_HOME}\logs\${context}.log"/>
</target>
It's turning this in log4j.properties:
[EMAIL PROTECTED]@
into this:
log4j.appender.daily.File=c:\jakarta\jakarta-tomcat-4.1.29\logs\coldev.l
og
Unfortunately, this results in log messages going to a file called
jakartajakarta-tomcat-4.1.29logscoldev.log
in the c:\jakarta\jakarta-tomcat-4.1.29\bin directory.
I tried quoting @logFileName@ but that produced:
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException:
"c:jakartajakarta-tomcat-4.1.29logscoldev.log" (T
he filename, directory name, or volume label syntax is incorrect)
when the webapp is started.
I think the answer is to escape the backslashes, but since part of it
comes from a system property, I don't see how.
Is there a way to do this on Windows? I can just use a .properties file
for the token/value replacements, I was trying to avoid hard-coding as
much as possible though.
--
Wendy Smoak
Application Systems Analyst, Sr.
ASU IA Information Resources Management
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]