Re: [nant-dev] Redirecting exec output to stdout

2005-07-18 Thread Gary Feldman

Kevin wrote:


Hello Everyone,

I just joined this list.

I’m working on a program that will spawn NAnt, and what I really want 
to do is to be able to capture all of the output from all of the 
executable programs that NAnt spawns. The reason why I want to do this 
is because I want to provide my users will real-time information about 
what NAnt is doing.


...

I don’t think there’s any way to do this currently. Please tell me if 
I’m wrong. If NAnt captured its spawned exec’s output and sent it to 
its own stdout, then I could capture the output from my program before 
NAnt finished executing. I looked at the source briefly, and to me it 
looks like some sort of change would need to be made to


I'm not sure what the problem is that you're trying to solve. NAnt 
already collects stdout from programs it execs, and puts it into the log 
on its stdout - unfortunately with [exec] prefixes on all of it. How 
exactly is the current behavior wrong for you?


Gary




---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers


RE: [nant-dev] Redirecting exec output to stdout

2005-07-18 Thread Kevin
Well, when I first made the posting, I was trying to launch VS.NET's
devenv.exe as an exec task, and it wasn't capturing the output.  When I
switched it to devenv.com, then it worked.  So my original assertion that
NAnt didn't pass through exec output to its own stdout was incorrect.

For the work I'm doing, it would be desirable to simultaneously capture the
NAnt output to an XML logger (for reporting purposes after the build is
completed) and pass the exec output straight through to NAnt's stdout (for
the purpose of giving the user real-time feedback about what the build is
doing right now).  If the build is long, I don't want the user to have to
wait to figure out what the build is doing right now.

Now, I'm not sure if NAnt can do that.  Haven't played with it enough.  If I
turn on the XML logger, does that mean it won't pass through the output to
stdout?  Is it either/or, or can NAnt do both at the same time?

Also, read my past follow-up posting on using the /out parameter with
devenv.com and sending it to a named pipe, which allows devenv output to be
captured before the task is completed.  I think NAnt would need specialized
support for this.  Still thinking about that one.

- Kevin

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Gary
Feldman
Sent: Monday, July 18, 2005 3:38 PM
To: nant-developers@lists.sourceforge.net
Subject: Re: [nant-dev] Redirecting exec output to stdout

Kevin wrote:

 Hello Everyone,

 I just joined this list.

 I'm working on a program that will spawn NAnt, and what I really want 
 to do is to be able to capture all of the output from all of the 
 executable programs that NAnt spawns. The reason why I want to do this 
 is because I want to provide my users will real-time information about 
 what NAnt is doing.

 ...

 I don't think there's any way to do this currently. Please tell me if 
 I'm wrong. If NAnt captured its spawned exec's output and sent it to 
 its own stdout, then I could capture the output from my program before 
 NAnt finished executing. I looked at the source briefly, and to me it 
 looks like some sort of change would need to be made to

I'm not sure what the problem is that you're trying to solve. NAnt 
already collects stdout from programs it execs, and puts it into the log 
on its stdout - unfortunately with [exec] prefixes on all of it. How 
exactly is the current behavior wrong for you?

Gary




---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers



---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477alloc_id=16492op=click
___
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers


Re: [nant-dev] Redirecting exec output to stdout

2005-07-17 Thread Troy Laurin
On 7/15/05, Kevin [EMAIL PROTECTED] wrote:
 What is the best course of action for getting this implemented?  Can I
 become a contributing developer and do it myself, or is someone else willing
 to do it? 
 
 Thank you. 
 
 - Kevin Dietz 

Kevin,

I spent some time implementing this behaviour last year, but have been
waiting for the 0.85 release before getting it patched into the source
tree.  I'll rustle up the code and make sure it works in the latest
version of NAnt, then submit the RFE with patches.  You'll be able to
patch your local NAnt if you want this behaviour before it is
committed into the CVS tree.

I should have some time tonight to do this.


-- 
Troy


---
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_idt77alloc_id492op=click
___
nant-developers mailing list
nant-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-developers


[nant-dev] Redirecting exec output to stdout

2005-07-14 Thread Kevin








Hello Everyone,

I just joined this list.



Im working on a program that will spawn NAnt, and
what I really want to do is to be able to capture all of the output from all of
the executable programs that NAnt spawns. The reason why I want to do this
is because I want to provide my users will real-time information about what
NAnt is doing.



Of course, I could set up my NAnt scripts to redirect the
output of tasks to one or more files, and when I get control back in my
program, I could read all of those output files and send them to my user.
But that technique means I have to want until the NAnt script is completely
finished executing. If the NAnt script is long-running, my user has to
wait to get any visual feedback.



I dont think theres any way to do this
currently. Please tell me if Im wrong. If NAnt captured its
spawned execs output and sent it to its own stdout, then I could capture
the output from my program before NAnt finished executing. I looked at
the source briefly, and to me it looks like some sort of change would need to
be made to NAnt.Core\Tasks\ExternalProgramBase.cs (at a minimum). Of
course, youd want to make it an option, either a global option to NAnt
itself, or an option on a task-by-task basis, and that would require changes to
other files.



What is the best course of action for getting this
implemented? Can I become a contributing developer and do it myself, or
is someone else willing to do it?



Thank you.

- Kevin Dietz