From the blog: http://www.jroller.com/page/gstamp/20030812
What we eventually realised was that no one really cares about our logging but us so what we did was not use logging at all by default . . . it is loaded by reflection so no external logging classes are referenced unless the user explicitly enables them
Ok... what is my first clue on how to do this? (aside from asking in poi-developer, or just looking the source, since it's Open Source.
My library classes all use log4j, and so my libraries instantly require log4j. I'd love to be able to have them run with or without.
I don't know his exact situation, but I've done a number of things to reduce package dependencies in my own little projects. For example, what if all logging statements used an object that was defined only by an interface.
Now the code has no idea what the actual logger class is. But that test for null is ugly and you have to do it every time you log. Easy to forget. How about a special NullLogger that does nothing?
This kind of thing is common in discussions of package dependencies. Here's a presentation I did for my team: http://www.surfscranton.com/architecture/DependencyInversion.htm. It has a picture of Robert Martin's book which is a treasure trove of good stuff like this. Hope that answer matched your question. Look into the OO, UML etc. forum further down the ranch for lots more talk about such design principles.
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi