commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <ge...@optonline.net>
Subject Re: [logging] LogFactory tangent : was Re: [logging] Need interface... VOTE
Date Fri, 05 Apr 2002 23:37:45 GMT
On 4/5/02 5:59 PM, "costinm@covalent.net" <costinm@covalent.net> wrote:

> On Fri, 5 Apr 2002, Geir Magnusson Jr. wrote:
> 

>> 2) If Log and LogFactory interfaces were separated from the .impl that is in
>> commons now, into two separate packages,
>> 
>>     o.a.c.l -> commons-logging.jar (contains the interfaces)
>>     
>>     o.a.c.li -> commons-loggingimpl.jar (contains the impl)
>> 
>> then 
>> 
>> 
>>   b) Alternative LogFactory implementations are easy to deploy as it just
>> means dropping the lightweight interface jar into the classpath, and the
>> alternative factory impl jar.
> 
> It doesn't matter where the LogFactory sits - if we define the helper
> ( org.apache.foo.LogFactory ) and it uses a static method it can't be
> reimplemented.

I see now - because the discovery functionality (the static method) and the
interface you are trying to discover (LogFactory) are combined, via
o.a.c.LogFactory being an abstract class with the static method, rather than
an interface, we're screwed if you want to replace LogFactory.

Is that it?  That's why I would have to remove o.a.c.LogFactory from the jar
and replace with my own?

So the LogFactory itself isn't really generic, as it presumes the helper?
And everyone who writes to this does

 import o.a.c.l.LogFactory;

 ...

  Log logger = LogFactory.getLogger();


Ok - so there's no point in continuing.  It seems like the only way to offer
a generic set of interfaces for logging is to do a different package...

Otherwise, the the basic interfaces (Log, LogFactory) can't be implemented
freely?

Hm....

-- 
Geir Magnusson Jr.                       geirm@optonline.net
System and Software Consulting
You're going to end up getting pissed at your software
anyway, so you might as well not pay for it. Try Open Source.



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


Mime
View raw message