It's pretty easy to write a j.u.l
LogManager
class which will defer all logging to a bespoke implementation which uses Log4J. This means that you can use log4j but still have the nice feature that libraries which log using j.u.l can be controlled as-if they had used Log4J.
Having used both (and commons-logging), I have to say that the thing which really, really, really annoys me is this:
log4j.error("An Exception", e);
jul.severe("An Exception", e); // GRRR! no such method
jul.log(Level.SEVERE, "An Exception", e); //Must use this method
Why did they make this design choice? Why? The other thing is that there's no PatternFormatter
which ships with j.u.l
- you have to roll your own.
That said, I'm erring to use j.u.l
from now on as it cuts down on external dependencies and isn't any more complicated to use.