in reply to Re^3: Prepending a string to STDERR output, and logging STDOUT & STDERR synchronously to a file
in thread Prepending a string to STDERR output, and logging STDOUT & STDERR synchronously to a file

trying it like this:
run (\@cmd, '>pty>', new_chunker(), sub{ print "STDOUT: $_[0]";}, '2>' +, new_chunker(), sub { print "STDERR: $_[0]";});
ALMOST works, but some lagging STDERR comes out at the end.

_________________________________________________________________________________
Without me, it's just aweso

  • Comment on Re^4: Prepending a string to STDERR output, and logging STDOUT & STDERR synchronously to a file
  • Download Code

Replies are listed 'Best First'.
Re^5: Prepending a string to STDERR output, and logging STDOUT & STDERR synchronously to a file
by OfficeLinebacker (Chaplain) on May 19, 2006 at 21:32 UTC
    ...and, the logical next step,
    run (\@cmd, '>pty>', new_chunker(), sub{ print "STDOUT: $_[0]";}, '2>p +ty>', new_chunker(), sub { print "STDERR: $_[0]";});
    really mangles the STDERR stuff, so that's no good. Also I see ^M characters at the ends of lines when looking at the logs in emacs, but the html seems fine.

    _________________________________________________________________________________
    Without me, it's just aweso