commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <ralph.go...@dslextreme.com>
Subject Re: [Configuration] experimental branch uses java.util.logging?
Date Wed, 15 Apr 2009 10:40:27 GMT

On Apr 15, 2009, at 12:22 AM, Ralph Goers wrote:

>
> On Apr 15, 2009, at 12:08 AM, Jochen Wiedmann wrote:
>
>> Ralph Goers wrote at Mittwoch, 15. April 2009 03:18:
>>
>>> By contrast, SLF4J supports many more variations of these, primarily
>>> because it supports Markers (which I will refer to in a moment).  In
>>> addition, SLF4J supports a message syntax that in many cases
>>> eliminates the need to wrap all the logging calls with if
>>> (logger.isXXXEnabled()).
>>
>> All true, but fix me if I'm wrong: My understanding is that SLF4J
>> requires recompiling the sources. That's a blocker, IMO.
>>
>
> Where did you get that idea?  Your application has to code to the  
> SLF4J API just as it has to code to the Commons Logging API if it is  
> using that. They are not identical.  However, no code changes are  
> required to plug in different logging implementations just as they  
> aren't for Commons Logging.
>

Let me be even more specific. You code your application to use SLF4J  
(or Commons Logging). You compile it. You then use the wiring  
mechanism each uses to select the appropriate logging implementation.  
With SLF4J that is done by including an "adpater" jar that bridges  
between the SLF4J API and the actual logging implementation. You don't  
have to recompile anything to make this work.

Ralph

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message