elTriberium has asked for the wisdom of the Perl Monks concerning the following question:
Hi, everyone. I've got a problem that I've been thinking about for a while:
We have a custom Test Harness and we use the TAP::Parser module to start tests and parse their output. All test output currently just goes to STDOUT. However, I would also like this output to go into a logfile automatically. What would you consider the best way of doing that? Should I just add a "2>&1 | tee $logfile" to the 'exec' call of TAP::Parser? Or would you recommend using a real logging module (like Log::Dispatch)? I don't want to modify each test individually (there are too many!), the module that uses TAP::Parser should create the logfile automatically.
Thanks for any suggestions!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Logging output of a script to screen AND file
by bobf (Monsignor) on Aug 07, 2010 at 03:34 UTC | |
|
Re: Logging output of a script to screen AND file
by Khen1950fx (Canon) on Aug 07, 2010 at 03:07 UTC |