Hi folks,
I've written a largeish (80 modules, 20k lines) mod_perl CMS and
currently the logging is a mess.
I've looked at a few on CPAN, noteably Log::Common, but I really want
something which:
- allows a single, global debugging level
- does not require each module to have access to Apache (the CMS
modules may be called from cron jobs)
I'm thinking that something I can just 'use' in each module which has a
BEGIN block to read its config (perhaps from httpd.conf), open the log
files, and class methods for logging would be the neatest approach - eg:
use My::Logger qw( log );
log($level,__PACKAGE__,$message)
Any recommendations? Should I do something Croak-like?
If there's nothing out there I'll happily write something and share it.
cheers
John