Hi Gert,
 
What I wanted to do was to prevent the stderr being written to the build
log, as NAnt sets the message level to "warning" which means that all
the stderr appears in my CCNet build summary and e-mail.
 
I have worked around the problem by configuring the <exec> task to run
my executable in a cmd.exe shell:
 
    <exec  program="cmd.exe" commandline="/C MyApp.exe -myAppArgs
2&gt;&amp;1"/>
 
2&gt;&amp;1 resolves to 2>&1 which instructs cmd.exe to redirect stderr
(output stream 2) to stdout (output stream 1).
 
Regards,
 
Alex.



________________________________

        From: Gert Driesen [mailto:[EMAIL PROTECTED] 
        Sent: Wednesday, January 30, 2008 6:53 PM
        To: Roebuck, Alex; nant-users@lists.sourceforge.net
        Subject: RE: [NAnt-users] <exec> redirecting stderr
        
        
        Alex,
         
        The <exec> task will write both stdout and stderr to the
specified output file; however, the current behavior is that both stdout
and stderr will still be written to the build log as well.
         
        Gert

________________________________

        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Roebuck,
Alex
        Sent: woensdag 30 januari 2008 16:35
        To: nant-users@lists.sourceforge.net
        Subject: [NAnt-users] <exec> redirecting stderr
        
        

        The <exec> task supports redirection of stdout, but not stderr.


        I have an executable which sends a lot of output to stderr.
NAnt logs all output to stderr as warnings.  These show up in my CCNet
Build Summary.  I'd like to redirect these, or prevent NAnt logging them
as warnings.  

        What's the best way to do this? 


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to