|
From: Mike S. <msc...@ao...> - 2003-01-10 22:28:17
|
Jim Cromie wrote:
> wrt to my use of AUTOLOAD to give Auto-Categorization,
> is that something for which you might accept a feature patch ?
Sorry for the late response on this, but finally I got around to it: In
short, I like the idea of having subroutine-based loggers, but I'm a
little unclear on how your implementation works and if it meets our
performance requirements. It looks to me like you're paying a high
performance penalty by AUTOLOADing and calling caller(), both of which
slow down the application significantly. One of the core Log::Log4perl
principles is that the overhead of logging should always be negligable.
Can you elaborate a bit more about how :autocategorize works and what
the perfomance impact is?
Also, I like your idea of having some kind of logic for Data::Dumper-ing
nested structures. However, we can't just use it for every reference
that comes in, because this syntax is somewhat taken by the new DBI
appender, which lets you specify the DB columns this way:
$logger->log([$col1, $col2, $col3]);
We're currently evaluating the idea of passing in an options hash before
the real message comes:
$logger->log({format => "dbi"}, $col1, $col2, $col3);
and
$logger->log({format => "dump"}, $some_ref);
The advantage of the latter over something like
$logger->log(Data::Dumper::Dump($some_ref));
is obviously the performance gain in case the message gets suppressed.
--
-- Mike
Mike Schilli
log...@pe...
|