You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4php-dev@logging.apache.org by Ivan Habunek <iv...@gmail.com> on 2011/08/25 15:48:08 UTC

Configuration adapters

I'm working on a new configurator for log4php.

The idea is to have a single Configurator object which "understands"
only configuration contained in a PHP array (like the one currently
used by LoggerConfiguratorPHP). Then, we have several Configuration
Adapters which can translate different configuration formats to a PHP
array.

This would mean that the same settings in XML and properties will
result in the same behaviour every time (currently that is not always
the case).

There is some early work here:
https://svn.apache.org/repos/asf/logging/log4php/branches/experimental/config-adapters/

Aditionally, the goal is to add good error reporting, since the
current configurators will hardly ever report when some setting cannot
be parsed.

What do you think? Should I go ahead with this for 2.2?

Regards,
Ivan

Re: Configuration adapters

Posted by Christian Grobmeier <gr...@gmail.com>.
Hello Ivan

> The idea is to have a single Configurator object which "understands"
> only configuration contained in a PHP array (like the one currently
> used by LoggerConfiguratorPHP). Then, we have several Configuration
> Adapters which can translate different configuration formats to a PHP
> array.
>
> This would mean that the same settings in XML and properties will
> result in the same behaviour every time (currently that is not always
> the case).

Amazing idea! In other words, you would like to map xml/json/whatever
to the mighty php-configuration. In this case a new format does only
require a new "Translator", from the new format to the php
configuration format. The idea is great, and it will be fantastic if
the performance is good (which I am assuming)

>
> There is some early work here:
> https://svn.apache.org/repos/asf/logging/log4php/branches/experimental/config-adapters/
>
> Aditionally, the goal is to add good error reporting, since the
> current configurators will hardly ever report when some setting cannot
> be parsed.
>
> What do you think? Should I go ahead with this for 2.2?

This is a very valuable contribution and I would say this is worth
increasing version number. If you have the cycles, yes please, go for
it.

Cheers!


> Regards,
> Ivan
>



-- 
http://www.grobmeier.de