Re: In the spirit of smaller groups/pieces . . .
[email protected] (Tatsuhiko Miyagawa) Tue, 24 Sep 2002 09:40:50 +0900
| Newsgroups | perl.p5ee |
|---|---|
| Message-ID | <[email protected]> |
At Mon, 23 Sep 2002 20:30:04 -0400,
Stephen Adkins wrote:
> When I evaluated log4perl quickly, it seemed that it was
> built on top of
>
> Log::Dispatch
> Log::Dispatch::Config
>
> Is this correct?
No. Log4perl is based on Log::Dispatch, but it doesn't use ::Config.
Some notes on Log4perl.pm by the author makes the difference clearer.
http://search.cpan.org/dist/Log-Log4perl/lib/Log/Log4perl.pm#How_about_Log_Dispatch_Config_
| How about Log::Dispatch::Config?
|
| Tatsuhiko Miyagawa's Log::Dispatch::Config is a very clever simplified
| logger implementation, covering some of the log4j functionality. Among
| the things that Log::Log4perl can but Log::Dispatch::Config can't are:
|
| You can't assing categories to loggers. For small systems that's fine,
| but if you can't turn off and on detailed logging in only a tiny
| subsystem of your environment, you're missing out on a majorly useful
| log4j feature.
|
| Defining appender thresholds. Important if you want to solve problems
| like "log all messages of level FATAL to STDERR, plus log all DEBUG
| messages in Foo::Bar to a log file". If you don't have appenders
| thresholds, there's no way to prevent cluttering STDERR with DEBUG
| messages.
|
| PatternLayout specifications in accordance with the standard
| (e.g. "%d{HH:mm}").
|
| Bottom line: Log::Dispatch::Config is fine for small systems with
| simple logging requirements. However, if you're designing a system
| with lots of subsystems which you need to control independantly,
| you'll love the features of Log::Log4perl, which is equally easy to
| use.
|
> Before its introduction, it had seemed that those two
> modules (distributions) provided the definitive logging
> capability for Perl and that log4perl mainly added a
> singleton interface over the top of it.
>
> Is this correct?
Apparently no. Log::Dispatch is a definitive logging module for
Perl. L::D::::Config buiilds configuration API and singleton-ness on
it. Log4perl gives the same, but it builds more complete replica (API
/ config file format compatiblity) of that of Java Log4J API.
--
Tatsuhiko Miyagawa <[email protected]>