incubator-empire-db-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Francis De Brabandere <franci...@gmail.com>
Subject Re: moving to slf4j
Date Mon, 13 Dec 2010 14:06:49 GMT
On Mon, Dec 13, 2010 at 1:54 PM, Rainer Döbele <doebele@esteam.de> wrote:
>
> I once stated an attempt to use slf4j but I had a problem with the configuration.
> Our class org.apache.empire.xml.XMLConfiguration uses the log4j DOMConfigurator (org.apache.log4j.xml.DOMConfigurator)
to initialize Logging from the config file.
>
> How do we replace this so that logging configuration from the config file is still possible?
>

We don't replace it by something else. We move that part out of the
empire-db main package. As this is logger implementation specific.

Slf4j is mainly an api containing interfaces. Then for each logging
implementation there are extensions. So for using log4j you would
still set up log4j as before and add slf4j-log4j to the classpath. The
difference is that the code will not call commons-logging but slf4j
instead.

If you want I can set up a branch where we try the switch.

Cheers,
Francis

> Regards
> Rainer
>
>
> Francis De Brabandere wrote:
>> from: Francis De Brabandere [mailto:francisdb@gmail.com]
>> to: empire-db-dev@incubator.apache.org
>> re: Re: 2.0.7-incubating release completed, what's next?
>>
>> Hi Andreas,
>>
>> On Mon, Dec 13, 2010 at 11:39 AM, Andreas Fink <andi@andreasfink.com>
>> wrote:
>> > Hi Francis, Rainer.
>> >
>> >>> Besides the prepared statement fixes we should reconsider the slf4j
>> logging (already tried but the problem seems to be the configuration)
>> and the exception handling - and maybe a few more things.
>> >>
>> >> I'm a fan of slf4j, and so dumping commons-logging. But the main
>> >> problem is that we have a hard dependency on log4j. We should at
>> least
>> >> make that optional.
>> >
>> > Why don't you have a look at Logback (+slf4j):
>> http://logback.qos.ch/documentation.html
>> > It is API compatible with slf4j, works with any logging impl out there
>> (jdk, commons, ...) and even writes to stdout if no impl is available
>> (handy for unit tests).
>>
>> I also think that as tool provider that we should not enforce any
>> logging framework implementation. We should stick to the best api
>> which at the moment is slf4j. Slf4j can use any other framework out
>> there as input (api) or output (implementation).
>>
>> > Moreover it gives you the possibility to keep the old calls to log4j
>> in the source, if this is really necessary: http://slf4j.org/legacy.html
>>
>> Since we move to a new minor version I think we should switch to slf4j
>> completely.
>>
>> I don't care too much what implementation we use in the examples /
>> unit tests: slf4j-log4j, slf4j-simple, slf4j-jdk14 or logback
>>
>> Cheers,
>> Fracnis
>>
>> >
>> > Cheers,
>> > Andi.
>> >
>> > --
>> > web:   http://andreasfink.com/
>> > mail:  af@andreasfink.com
>> > mobil: +34 65 1728443
>> > tel:   +34 93 2082949
>> >
>> >
>>
>>
>>
>> --
>> http://www.somatik.be
>> Microsoft gives you windows, Linux gives you the whole house.
>



-- 
http://www.somatik.be
Microsoft gives you windows, Linux gives you the whole house.

Mime
View raw message