in reply to Log Files Module
Rather than looking for a specific module to redirect a your error and warnings, why cant you simple write a small module which redirects your STDERR and STDOUT to a log file. tie that module in your program.
Is my suggestion acceptable. Because i did this way and i find it very useful and handy because i can tune accordingly to my need.
A small psuedo code for you...it will be help full..i think..
-Prasanna.Ksub setlog { unless( ($log = tie(*STDOUT, 'your::module', ">>$LOGFILE")) +) } -------------- your::module ------------- sub PRINT { $fh # file handle my $line = (caller(0))[2]; syswrite $fh, sprintf("[ %-18.18s %s %4.4s ] %s %s", "$script $lin +e", }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Log Files Module
by Anonymous Monk on Dec 28, 2005 at 17:31 UTC | |
|
Re^2: Log Files Module
by Anonymous Monk on Dec 28, 2005 at 17:35 UTC |