in reply to Re: STDOUT, STDERR sniffer
in thread STDOUT, STDERR sniffer

The goal is:

USER will compile a big project.
TOOLCHAIN SUPPORT (me) want to track the compilation results (compilation time, success or fail, NFS problem, etc) and mail them.
The USER have to see all the output, so all the reporting process must be transparent for the USER. It's just a compilation sniffer (STDOUT, STDERR).

Maybe perl is not the solution.

Thinking about your suggestions:
Redirecting the STDERR/STDOUT is not the solution because the user won't have any output.
Tee has to write on Tee object, not directly on STDOUT (If an app write directly to STDOUT, it is not captured to the others filehandlers). I have a question here, is there a way to redirect Tee object to STDOUT ? : *STDOUT = $TeeObj;

Replies are listed 'Best First'.
Re^3: STDOUT, STDERR sniffer
by inguanzo (Acolyte) on Jul 21, 2004 at 18:13 UTC
    UPS ! The previous Anonymous Monk was me...
      Hi all cool monks around,

      I found the solution to my implementation:
      Tee is a nice perl module, I suppose the name comes from the tee unix command.

      I mixed 2 scripts (shell & perl), shell for capture and perl for analize & reporting:

      Shell script:

      build_project_command 2>&1 | tee ~/rep/DATE_TIME_PRODUCT analize_report_mail.pl ~/rep/DATE_TIME_PRODUCT
      Modify the .profile (PATH priority) and give the same name the real compiler has.
      Now the user will continue compiling as before, the output still untouched and toolchain support guy happy !

      So, now we are able to know & evaluate the performance of the compilation environment at real time.

      Thanks a lot for all your replies and help

      Inguanzo
      >emacs rules<