Content deleted Content added
Line 138:
JCL isn't really a logging framework, but a wrapper for one. As such, it requires a logging framework underneath it, although it can default to using its own <code>SimpleLog</code> logger.
Both JCL and slf4j are useful when developing reusable libraries which need to write to whichever underlying logging system is being used by the application. This also provides flexibility in heterogeneous environments where the logging framework is likely to change, although in most cases, once a logging framework has been chosen, there is little need to change it over the life of the project. sjf4j benefits from being a newer and builds on the lessons learned from older frameworks. Moreover JCL has known problems with class-loaders when determining what logging library it should wrap - see for example this note from Spring [
The Java Logging API is also not a logging framework, but a standard API for accessing a logging framework. Compatible frameworks can be loaded into JVM and accessed via the API. There is also a logging implementation supplied with the Sun JVM which is the default logging framework accessed by the API. Many developers confuse this implementation with the Java Logging API. Configuration is by external files only which is not easily changed on the fly (other frameworks support programmatic configuration).
|