Re: Start a program and get a hold of it's STDOUT and STDIN?



Snail <snail@xxxxxxxxxxxxx> wrote:
> Hello. I am trying to write a logging program to wrap around a server
> program that we need that doesn't have logging capabilities of it's own.
> Normally, one would just redirect it on the command line:

> ./server 2>&1 logfile.log

> But this doesn't have any dating what so ever and it can get hard to
> read as it grows.

> I've been search all over (perldoc, google, etc) and all I could find
> was examples of getting STDIN or STDOUT (using pipes) but not both at
> the same time. Further mode, I need this to be in real time (when the
> server spits out something to STDOUT/ERR I want my program to
> immediately get this, and then process it (add a line to the log file,
> perform some processing if a certain event occurs, such has a new
> connection, etc.)

% server 2>&1 | wrapper_prog

Axel
.



Relevant Pages

  • Re: Problem with WSH Shell Exec StdOut
    ... catch its StdOut stream in real time. ... NeroCmd.exe is a command line utility included ... Here is the script I'm currently using: ...
    (microsoft.public.scripting.vbscript)
  • Re: Problem with WSH Shell Exec StdOut
    ... catch its StdOut stream in real time. ... then almost immediately I get a command window displaying the following: ... You have to abort the script by ending the ...
    (microsoft.public.scripting.vbscript)
  • Re: Problem with WSH Shell Exec StdOut
    ... catch its StdOut stream in real time. ... then almost immediately I get a command window displaying the following: ... Here is the script I'm currently using: ...
    (microsoft.public.scripting.vbscript)
  • Re: Problem with WSH Shell Exec StdOut
    ... catch its StdOut stream in real time. ... NeroCmd.exe is a command line utility included with or ... Here is the script I'm currently using: ...
    (microsoft.public.scripting.vbscript)
  • Re: Problem with WSH Shell Exec StdOut
    ... catch its StdOut stream in real time. ...
    (microsoft.public.scripting.vbscript)