> I like the philosophy of the package, but calling
> get_logger in every single functions that logs is just a
> waste.
This is an emulation of a Java api--you were expecting terse and
concise? ;-)
But seriously, if you don't want to call get_logger in every function,
then don't--you could, for instance, make the logger a class variable:
use strict;
package Groceries::Food;
our $logger = Log::Log4perl::get_logger('Groceries::Food');
sub eat {
$logger->debug("eating");
}
sub drink {
$logger->debug("drinking");
}
--
Happy Trails . . .
Kevin M. Goess
(and Anne and Frank)
904 Carmel Ave.
Albany, CA 94706
(510) 525-5217
|