in reply to RFC: Module idea: Carp + controlled email
You might want to look at Log::Log4perl. It can do everything you want with a little work:
read contact info from a central file:
Check. You can do something like Log::Log4perl::init('/etc/log4perl.conf'); at the start of your script to setup logging for all modules.
Control how often emails get sent
Write a custom appender and you can make it do whatever you like. Log::Log4perl::Appender::Buffer could probably do what you want.
Optionally override normal warn/die/carp/croak calls
See My program already uses warn() and die(). How can I switch to Log4perl? in the FAQ.
Optionally handle unexpected death as well as die/croak calls
See How can I make sure my application logs a message when it dies unexpectedly? in the FAQ.
Make it so the user can do as much configuration as possible at the beginning
You can do all the configuration in one call at the start.
|
|---|