Java logging framework: Difference between revisions

Content deleted Content added
Line 105:
Of the major players, [[log4j]] is still the front runner in the [[Java]] [[Logging]] ___domain{{Fact|date=June 2008}}. The log4j project has been around for a long time and has lots of support from the development community. It's simple to implement, yet has powerful tools built in to accomplish most logging tasks. It is also easily extensible to handle proprietary needs.
 
The newer logging API, which has been included in the JRE since 1.4, incorporates many of the same concepts as log4j. It has loggers and appenders. However, log4j has been much more broadly used and there are many out-of-the-box solutions in log4j that are lacking in the Java Logging API.{{Fact|date=November 2007}}
 
The Jakarta Commons Logging isn't really a logging framework, but a logging framework wrapper. As such, it requires a logging framework underneath it. It would be useful in an heterogeneous environment where the logging framework is likely to change. However, in most cases, once a suitable logging framework has been chosen, there is little need to change it over the life of the project.
 
The Java Logging API is also not a logging framework, but standard API for accessing a logging framework. Compatible frameworks can be loaded JVM and accessed via the API. There is also an logging implementation supplied with the Sun JVM which is the default logging framework access by the API. Many developers confuse this implementation with the Java Logging API.
 
 
[[SLF4J]] and [[Logback]], both originally written by the same original writer of [[log4j]], are growing potential replacements in particular for log4j and Jakarta Commons Logging.