Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Redirecting logging and STDERR to a single fileby brian_d_foy (Abbot) |
on Mar 04, 2005 at 21:37 UTC ( [id://436771]=note: print w/replies, xml ) | Need Help?? |
If you have trouble telling where an error occured in the script, output file and line information along with your error message. If this thing is spread across multiple machines, you could even add host info to each line of error output. I generally have a subroutine that handles that sort of thing for me. That way, it's behaviour is in one place, and the rest of the script only has to know that it is logging something (and not the details of whre it goes or what other information is attached).
-- brian d foy <bdfoy@cpan.org>
In Section
Seekers of Perl Wisdom
|
|