>Many projects encapsulate log4j in wrappers. I guess that approach is 
>similar to option 1. The wrapper is the interface and the underlying 
>implementation is log4j.

Right on.  The Adapter pattern would seem to serve us well here--we settle 
on some reasonable standard/conventional logging implementation and code 
everything to that interface.  Other logging implementations can be used by 
either sharing that conventional interface, or by providing an adapter that 
maps the conventinal interface to the "unconventional" one.

(Alternatively, one could code a module that uses an "unconventional" 
logging interface, and provide an adapter that maps the unconventional 
interface to the conventional one.)

I think this should be a recurring approach to the jakarta-library stuff.  
Essentially we have one package (and one distributable bundle) that defines 
the common interface, and one or more implementation packages (and 
distributable bundles).  E.g., something like:

org.apache.jakarta.library.widget.interface
org.apache.jakarta.library.widget.someimpl
org.apache.jakarta.library.widget.anotherimpl

What's up with the JSR047 versus log4j anyway?  What's the real status of 
JSR047?  The site says beta in March 2001.  I assume at this point we know 
it's not going to be log4j?

- rod
_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com

Reply via email to