ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: Get timestamping in the echo message
Date Fri, 18 Mar 2005 16:54:33 GMT
<project>

    <scriptdef name="log" language="javascript">
        <attribute name="message"/>
        <![CDATA[
            formatter = new
java.text.SimpleDateFormat("yyyy.MM.dd-HH:mm:ss:SSS");
            log = project.createTask("echo");
            log.setMessage(formatter.format(new java.util.Date()) + " - " +
attributes.get("message"));
            log.perform();
        ]]>
    </scriptdef>


    <log message="one"/>
    <log message="two"/>

</project>


Jan

> -----Ursprüngliche Nachricht-----
> Von: Ninju Bohra [mailto:ninju_bohra@yahoo.com]
> Gesendet am: Freitag, 18. März 2005 17:45
> An: Ant Users Group
> Betreff: Fwd: Get timestamping in the echo message
> 
> It did not seem to go through the first time I sent it...if 
> at first you don't succeed try again.
> 
> Ninju Bohra <ninju_bohra@yahoo.com> wrote:Date: Fri, 18 Mar 
> 2005 08:17:50 -0800 (PST)
> From: Ninju Bohra <ninju_bohra@yahoo.com>
> Subject: Get timestamping in the echo message
> To: Ant Users Group <user@ant.apache.org>
> 
> Hey all,
>  
> It there a way to get a timestamp printed with every <echo> 
> invocation... I thought remember somebody using <presetdef> 
> (or something else) to get the current time printed out with 
> every message...
>  
> Thanx in advance,
>  
> Ninju
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Small Business - Try our new resources site! 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam protection around 
> http://mail.yahoo.com 
> 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message