ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Angeshwar Deepak <angesh...@yahoo.com>
Subject RE: How to echo date-time to log file?
Date Tue, 14 Sep 2004 13:33:52 GMT
Hi,
 
I am not sure what you want, but you can echo something to a file using this method
 
<echo file="${site}"><![CDATA[<?xml version="1.0"?>
<site label="ForrestArticle" href="" xmlns="http://apache.org/forrest/linkmap/1.0" tab="">
<about label="Juna">
<!--WHAT EVER U WANT TO BE PUT INTO THE FILE-->
]]></echo>

.....some build content....
 
<echo file="${site}" append="true"> <![CDATA[
<level2 label="@{sitecomponent}" href="@{sitecomponent}/">   ]]></echo>
 
Where ${site} is the location and name of the log file. All the content in-between <![CDATA[
and ]]></echo> will be written to the ${file}. 
 
Using this I was able to generate a seperate build file at 'run time', the same can be done
for creating a log file.
 
bye,
with regards,
Deepak.

 
Oops ! But this would echo only on the screen!

Ankita Kapadia <ankita_kapadia@persistent.co.in> wrote:Oops ! But this would echo only
on the screen!

-----Original Message-----
From: Ankita Kapadia [mailto:ankita_kapadia@persistent.co.in]
Sent: Tuesday, September 14, 2004 6:51 PM
To: Ant Users List
Subject: RE: How to echo date-time to log file?











.......










...build status etc.......
Build Start Time : ${starttime}
Build End Time : ${NOW}





-----Original Message-----
From: Patrick Surry [mailto:Patrick.Surry@quadstone.com]
Sent: Tuesday, September 14, 2004 6:40 PM
To: Ant Users List
Subject: How to echo date-time to log file?


This seems like a stupid question (and probably is!) but I can't seem to
find
what I'm looking for anywhere obvious. I have a build that takes a long
time,
and would like to be able to record the current date/time at various points
throughout the build. Just like you get when you run in 'verbose' mode but
without all the extra verbosity. Ideally I'd want something like a
'timestamp'
attribute in the echo task, so I could do things like:


...


Are there any obvious solutions to this - running an exec with a 'time'
command
seems like a hack, doesn't really do what I want; the ant-contrib
doesn't give absolute times, just differences; the 
task
probably could change log verbosity to force ant-generated timestamps at
different points but again seems roundabout/overkill.

Patrick

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org



		
---------------------------------
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message