Just another Perl shrine | |
PerlMonks |
My proudest momentby pileofrogs (Priest) |
on Oct 29, 2007 at 16:02 UTC ( [id://647874]=perlmeditation: print w/replies, xml ) | Need Help?? |
Hark ye, monks, particuarly ye sysadmin type monks. I recently had a perl epiphany that I wish to shout from the mountain tops. It is simple and it is powerful. If you are a sysadmin, as I am, this is a wonderful thing.
This puts the "die" message into syslog. No more do you have to pepper your script with syslog calls next to each die, only to have your script actually die for some reason you either forgot to syslog or didn't manually die from. Rejoice! --Pileofrogs Update: Yes, use openlog. I just left it out to keep my example super short. Besides, the point is using $SIG{__DIE__} to call your logging routines, whatever they are.
Back to
Meditations
|
|