On Fri, 7 Feb 2003, Ryan Hoegg wrote:

> Date: Fri, 07 Feb 2003 16:49:15 -0500
> From: Ryan Hoegg <[EMAIL PROTECTED]>
> Reply-To: Jakarta Commons Developers List <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: [logging] To depend or not to depend?
>
> Starting a new thread for this, it really has little to do with CLI.
>
> We are having a similar dilemma in XML-RPC.  The idea of a
> SafeCommonsLogger seems sound.  It could even end up in a commons-stub
> package.  It would do nothing if commons-logging-api.jar or
> commons-logging.jar is not in the CLASSPATH.
>

Instead of trying to convert every commons-logging user in the world to
switch to using SafeCommonsLogger as a wrapper around commons-logging
(which is itself a wrapper around ... nah, let's not go there at the
moment :-), I have an alternative suggestion.

Why not just provide a trivially simple two-class JAR file that defines
org.apache.commons.logging.Log and org.apache.commons.logging.LogFactory
with exactly the same public APIs as the "real" ones?  Then, just ship
this tiny little JAR file with apps (or applets) that don't want to use
commons-logging.  The resulting JAR file is going to be pretty much the
same size as something containing SafeCommonsLogger anyway.

As long as your replacement classes maintain binary compatibility with the
standard ones, any code that currently thinks it is using commons-logging
will be transparently using your own version instead.

> --
> Ryan Hoegg

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to