On Fri, 7 Sep 2007, Jonathan Swartz wrote:

> I'd be interested in feedback on a proposed module, Log::Abstract,
> described here:
>
>      http://use.perl.org/~jonswar/journal/34366
>
> This would be a tiny module designed to bridge CPAN modules that wish
> to log (e.g. LWP, DBI, ...) with existing logging frameworks (e.g.
> Log4perl), without the need for those modules to explicitly tie
> themselves to a single framework.
>
> I'm a longtime log4perl fan/user, and Log::Abstract is my way of
> increasing the input to log4perl in applications without resorting to
> tricks such as infiltrate_lwp(). :)

Hi Jonathan,

you're addressing something really important here. It is really
unfortunate that important CPAN modules like LWP or Rose::DB don't have
usable logging mechanisms in place. Once you're used to category-based
logging it's hard to go back to these home-grown and less convenient
solutions.

I think it's a great idea to promote standardized logging on CPAN and
letting the user choose the actual implementation will definitely help
to make strides towards that goal.

By the way, I don't agree that "For small modules that want to minimize
dependencies, depending on Log4perl (for example) is a non-starter." The
Log4perl core doesn't have dependencies other than perl's core modules.

One thing missing from your proposal is Log4perl's :easy mode. If you
think about it, getting a logger and calling its method is a lot of
typing, given that you just want to log something. That's why in
Log4perl you can use

    DEBUG "Log this!";

and you're done. No getting a logger, no method calling, no category
passing. It's all automatic. Behind the scenes, it gets a 'stealth
logger' with the category set to the current package and calls the
appropriate logging method on it. This feature is huge. I'm using it
almost exclusively in everything I write. Any chance of adding that?

Keep up the great work!

-- Mike

Mike Schilli
[EMAIL PROTECTED]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel

Reply via email to