-
JUL - Java Universal Logger (1 messages)
- Posted by: Dan Howard
- Posted on: October 26 2008 08:22 EDT
Why not handle logging the same way as JDBC? Instead of dealing with the pain of various libraries using various different loggers we could do this instead: class.forName("org.apache.log4j.Log4j") Logger.setLogManagerImpl(org.apache.log4j.LogManager.class); Then when we used: Logger log = LogManager.getLogger(...); Logger would be an interface. The LogManager would return the specified implementation. The default would be java.util.logging. Now we don't have to explicitly have imports for various loggers. AND other libraries would then use whatever particular logging implementation we wanted.Threaded Messages (1)
- Try commons-logging by Rahul Mohan on October 29 2008 05:52 EDT
-
Try commons-logging[ Go to top ]
- Posted by: Rahul Mohan
- Posted on: October 29 2008 05:52 EDT
- in response to Dan Howard
commons-logging does exactly the same thing. Even the code that you wrote ( class.forname.... ) need not be written. http://commons.apache.org/logging/