Java – compare log4j and logger
Compare the logger of JDK with Apache log4j?
Which is more suitable for a new project for Java 6? How do they compare flexibility and configurability?
Solution
In my opinion, the only thing JDK logger does is that it is part of JDK, so it does not add external dependencies If I choose between the two, I will go with log4j For adders, the number of people who know it (in my anecdotal observation), there is a better API (also subjective), and it still has better support
Starting a project today, the most attractive thing is to use slf4j and deffer to make a decision - just change the classpath to insert a different framework under slf4j
It is said that other options (such as log5j) can take advantage of the latest Java language features I suggest a long-term look at logback (from one of the main programs of log4j, slf4j)