I want to be able to write a perl script that does advanced logging of both itself and the system() calls it makes.
One of my desired goals is to replace STDERR and STDOUT in such a way that 1) the command line user still sees them both, and as they are output (not strangely buffered) 2) I have a log of every snippit of STDERR and STDOUT with the time (in granularity more fine than seconds, if possible) it arrived and in the order that it was received. e.g. if I had something like $| = 1; print STDERR "Why don't you"; print STDOUT " eat my"; print STDERR " shorts?\n"; I might end up with something like [ { type => 'STDERR', time => 1, text => "Why don't you" }, { type => 'STDOUT', time => 1.0001, text => " eat my" }, { type => 'STDERR', time => 1.0002, text => " shorts?\n" }] in memory somewhere... Is there something out there that already does this? Or does it on arbitrary numbers of filehandles/io::handles? Thanks in advance, nh