Milton Smith wrote, On 18/06/2003 18.23:
--- Nicola Ken Barozzi <[EMAIL PROTECTED]> wrote:

A problem with logging libraries, is that even if I
only use the app without needing *any* logging, I still have to
include the jar of the logging library. And as small as it may be, it's
still something I'd like to not distribute.

One idea here. Don't use the Log4J implementation directly. Make an adapter layer that calls Log4J internally. Then your programs call the logging methods of your adaptors to log. The adaptors would compile and ship with your code. In side the adaptors you would use reflection to access Log4J. In this way you can choose to ship the Log4J jar or not. Also the adaptors could access other logging systems if needed. Since everything uses reflection there would not be any compile errors if any jars are not present.

Yup, I thought about this too. And that's what I did with POI.


Basically it's like conceptually embedding Jakarta Commons Logging in every jar.

Many to which I have proposed this have not been very happy about it. :-(

--
Nicola Ken Barozzi                   [EMAIL PROTECTED]
            - verba volant, scripta manent -
   (discussions get forgotten, just code remains)
---------------------------------------------------------------------



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



Reply via email to