in reply to perl program execution log.
A plethora of modules for logging exist, just search CPAN for "Log" and you'll find them (there are various pros and cons to each of them, which you'll be in the best position to assess).
The easiest way to log from scripts which are run via cron is to just print logging messages to STDOUT or STDERR and redirect the messages to a log file. For example (crontab entry):
This will redirect all output (STDOUT and STDERR) to /var/log/myscript.log0 * * * * /usr/local/bin/myscript >> /var/log/myscript.log 2>&1
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl program execution log.
by VSarkiss (Monsignor) on Nov 17, 2005 at 03:09 UTC |