Re: New extension to access liblog4cxx functions

From: Date: Sat, 12 Dec 2009 04:11:18 +0000
Subject: Re: New extension to access liblog4cxx functions
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-6898@lists.php.net to get a copy of this message
On Fri, 11 Dec 2009 09:23:01 -0000, Jarismar Chaves da Silva <jarismar.php@gmail.com> wrote:
I'm developing a php extension that wraps the Apache's log4cxx ( http://logging.apache.org/log4cxx/index.html) as a php extension. For now the extension is hosted at http://code.google.com/p/php-logger-extension and a beta release is also available. I want to ask if it is possible to also make the extension available at pecl site. Please check it out and let me know what you think.
I think the idea has some merit, but the mention of log4cxx reminds me of log4j and the logging framework mess that plagues Java development. The multiplication of logging frameworks is not a desirable outcome. Perhaps you could elaborate on how this is superior to PEAR Log and how its introduction does more good than harm. I've gathered a few random points from a glance at the extension. * What convention do you propose for logger names? I see you use Class::method in the examples. This may make some sense since you target the 5.2 branch (no namespaces), but what about code outside a method definition? That convention also denies the possibility of setting the logging level for an entire library or package at one time -- the great advantage of being able to define the logging level with arbitrary granularity is kind of lost here. * Please add a config.w32 file so that the extension can easily be built on windows. * It could be useful to separate the API from the implementation and be able to plug it to e.g. the native PHP logging or PEAR logging. That would at least mitigate the problem of logging framework multiplication. * I have no idea about the feasibility but perhaps implementing a PEAR Log bridge would also be useful. This together with the last item would be similar to the successful slf4j approach. -- Gustavo Lopes

« previous php.pecl.dev (#6898) next »