ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Surry <>
Subject How to echo date-time to log file?
Date Tue, 14 Sep 2004 13:09:43 GMT
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:

<echo timestamp="true" message="Starting job..."/>
<echo timestamp="true" message="Finished job."/>

Are there any obvious solutions to this - running an exec with a 'time' command 
seems like a hack, <tstamp/> doesn't really do what I want; the ant-contrib 
<stopwatch/> doesn't give absolute times, just differences; the <record/> task

probably could change log verbosity to force ant-generated timestamps at 
different points but again seems roundabout/overkill.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message