How do you log the execution of a Perl script?
Allow me to mention a more compex, but complete, option. Perl has a number of logging modules on CPAN; my personal choice in my projects is Log::Log4perl. It's a bit complex -- approx. 10-15 lines of additonal code for the "base model". And installing the module via Windows take a bit of work, as well. Yet there's nothing better than proper logging, esp. one that can log to screen, files, emails, and even Windows Event Logs.
Seems like overkill for a script? Not really. If you're producing tons of debugging code, having it segmented in the ways programs like Log::Log4perl allow gives you the ability to track just one section of the code you're running. The Log4perl FAQ page also gives a code sample for logging unexpected failures, a powerful tool for those who run cron jobs.
Getting STDOUT and STDERR is good, getting solid logging rocks. :) A good tutorial is on perl.com
----Asim, known to some as Woodrow.
In reply to Re: execution log
by Asim
in thread execution log
by yburge
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |