For some reason, my ant script has been stripped off from the previous email, 
so I am attaching it.
 
I have to modify the result in the previous email as well:

     [echo] Parent target started
 
child:
     [echo] Child target started - child-01.log
     [echo] Child target processing - child-01.log (*1)
     [echo] Child target ended - child-01.log
 
child.2:
     [echo] Child target started - child-02.log
     [echo] Child target processing - child-02.log (*1)
     [echo] Child target ended - child-02.log
     [echo] Child target ended - child-02.log (*2)

(*1) I'd like to remove these from the parent log.
(*2) don't know why it is written
 
Thanks,
jerry
----------------------------------------
> From: genes_ch...@hotmail.com
> To: user@ant.apache.org
> Subject: Scope of a record task name
> Date: Tue, 4 Aug 2009 12:43:58 -0400
>
>
> Hi Users,
>
> I just wondered of the scope for a record task name, so it would be great if 
> you could share your knowledge.
>
> I have two targets to record both activities like these:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> I was assuming the record name could be managed globally, but it seems not. 
> The record for ${parent.log} in the child target is created as a separate 
> entry (RecorderEntry) and the log messages are written twice in the parent 
> log file (Tested with ant 1.7.1 + revision 793792 for bug 41368)
>
> Parent log:
> [echo] Parent target started
>
> child:
>
> child:
> [echo] Child target started
> [echo] Child target started
> [echo] Child target processing
> [echo] Child target ended
> [echo] Child target ended
>
> I am not sure if it is working as expected or if it is a side effect of the 
> fix for bug 41368. If it is by design, is there any other way to control a 
> record entry created from another target?
>
> Thanks,
> Jerry.
>
> Jerry Gene-Sung Chung
> genes_ch...@hotmail.com
> _________________________________________________________________
> Stay on top of things, check email from other accounts!
> http://go.microsoft.com/?linkid=9671355
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
> For additional commands, e-mail: user-h...@ant.apache.org
>
_________________________________________________________________
Stay in the loop and chat with friends, right from your inbox!
http://go.microsoft.com/?linkid=9671354
<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="Record Test" default="parent">
    <property name="parent.log" value="parent.log"/>
    
    <target name="parent">
        <record action="start" name="${parent.log}"/>
        <echo message="Parent target started"/>

        <antcall target="child">
            <param name="child.log" value="child-01.log"/>
        </antcall>
        <antcall target="child.2">
            <param name="child.log" value="child-02.log"/>
        </antcall>

        <record action="stop" name="${parent.log}"/>
    </target>
    
    <target name="child">
        <record action="start" name="${child.log}"/>
        <echo message="Child target started - ${child.log}"/>
        <record action="stop" name="${parent.log}" append="yes"/>

        <echo message="Child target processing - ${child.log}"/>
        <sleep seconds="1"/>
    
        <record action="start" name="${parent.log}"/>
        <echo message="Child target ended - ${child.log}"/>
        <record action="stop" name="${child.log}"/>
        <record action="stop" name="${parent.log}"/>
    </target>

    <target name="child.2">
        <record action="start" name="${parent.log}" append="yes"/>
        <record action="start" name="${child.log}"/>
        <echo message="Child target started - ${child.log}"/>
        <record action="stop" name="${parent.log}"/>

        <echo message="Child target processing - ${child.log}"/>
        <sleep seconds="1"/>
    
        <record action="start" name="${parent.log}"/>
        <echo message="Child target ended - ${child.log}"/>
        <record action="stop" name="${child.log}"/>
        <record action="stop" name="${parent.log}"/>
    </target>
</project>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@ant.apache.org
For additional commands, e-mail: user-h...@ant.apache.org

Reply via email to