Title: RE: [Nant-users] Emailing the build log

Hi again Dave.

You're right I've had the same problem, rederincting the output locks or something  the file

What you could do is emailing the status of your build , not the log file itself & take a look at the log file if needed.

Or if you do need to have the build log emailed maybe you could create a 2nd build file
The first call your current build file with the Exec task , redirect the output
& then emails the build log
Should be something like

 <exec program="nant" commandline="-buildfile:Main.build > build.log "/>
<mail                                                 
  from="[EMAIL PROTECTED]"                         
  tolist="[EMAIL PROTECTED]"                 
  subject="build report"                   
  attachments="buyild.log"        
  mailhost="smtpserver.anywhere.com"/>                
Once the exec task is finished any lock on "build.log" should be release .

Or looking at the source code from ConsoleRunner.cs there are some undocumented command line options (the 2 last one):
                                                             
                const string buildfileOption   = "-buildfile:"
                const string setOption         = "-D:";      
                const string helpOption        = "-help";    
                const string projectHelpOption = "-projecthelp
                const string verboseOption     = "-verbose"; 
                const string findOption        = "-find";    
                //not documented. Used for testing.          
                const string indentOption        = "-indent";
                const string loggerOption      = "-logger:"; 
                const string logFileOption      = "-logfile:";

These could be used to put a custom logger that logs to a file...
But that's kinda of an unecessary hack I think

Hope this helps
Yves



> -----Original Message-----
> From: Dave Adair [mailto:[EMAIL PROTECTED]]
> Sent: 25 September 2002 23:14
> To: [EMAIL PROTECTED]
> Subject: [Nant-users] Emailing the build log
>
>
> I have a task to email the build log file as the last
> task in my build file.  But it's failing with the
> following error:
>
> [mail] WARNING! File "Build.log" NOT attached to
> message. File does not exist or cannot be accessed.
>
> If I execute just the mailLog task it works fine.  I
> asssume the problem is that the Build.log file is
> being generated by redirecting the output from NAnt to
> Build.log so the file is locked or something when the mail
> task tries to attach the file to the mail.
>
> Is redirecting NAnt's output the only way to log the
> build messages?  If so, how can I email the build log?
>
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
>
>
> -------------------------------------------------------
> This sf.net email is sponsored by:ThinkGeek
> Welcome to geek heaven.
> http://thinkgeek.com/sf
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/n> ant-users
>

Reply via email to