View Single Post
  #1 (permalink)  
Old August 3rd, 2011, 07:47 AM
raju.sathliya raju.sathliya is offline
Registered User
Points: 14, Level: 1
Points: 14, Level: 1 Points: 14, Level: 1 Points: 14, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2011
Posts: 3
Thanks: 1
Thanked 0 Times in 0 Posts
Default Nant Logger problem

Hi,
I need to create log file for my each build and for this I'm using command line as
nant -logfile:output.txt -buildfile:my.build -D:client.name=xyz-D:branch=abc

So above command is generating log file at same location at which my build script "my.build" is running (let say C:\build) and log file (output.txt) is Ok and contains all the required data

but I want to move Or copy each of generated log files to new location which will be created by variable are passed to script and for this I'm using below target to copy log to new directory


<target name="build">

<mkdir dir="${logger.dir}" if="${not directory::exists(logger.dir)}" />
<some command to compile solution>
----
<copy file="C:\build\output.txt" tofile="${logger.dir}\webbuild.${build.date}.txt" overwrite="true"/>

</target>

above target is copying empty webbuild.${build.date}.txt without any data.

I did some investigation and found that since nant is using output.txt in above commandline (i.e nant -logfile:output.txt -buildfile:my.build -D:client.name=xyz-D:branch=abc) so It's not allowing to me to copy Or move output file to new location.

Can anyone suggest me some solution for this ..As what approch I should follow to make this posible.

note : after my commandline completes then only I can copy the file..but i need to copy/move generated log file to new location at one go using same above commandline

Thanks,
Raju

Last edited by raju.sathliya; August 3rd, 2011 at 07:55 AM..
Reply With Quote