Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Difference between Simple Logging Facade for Java and Apache Commons Logging

What is the difference between Simple Logging Facade for Java and Apache Commons Logging?

like image 981
Azder Avatar asked May 16 '09 18:05

Azder


People also ask

Is Commons logging using Log4j?

Apache Commons Logging is an abstraction for the concrete implementation. It uses log4j, if present and configured.

What is Commons Logging used for?

Apache Commons Logging (previously known as Jakarta Commons Logging or JCL) is a Java-based logging utility and a programming model for logging and for other toolkits. It provides APIs, log implementations, and wrapper implementations over some other tools.

Which logging framework is best for Java?

One of the most popular solutions for the Java world is the Apache Log4j 2 framework. Maintained by the Apache Foundation, Log4j 2 is an improvement on the original Log4j, which was the most popular logging framework in Java for many years.

What is the difference between Log4j and Commons Logging?

log4j is a logging framework, i.e. it provides the code to log messages. Commons-logging is an abstraction layer for logging frameworks, it doesn't log anything itself.


1 Answers

From the SLF4J FAQ:

SLF4J is conceptually very similar to JCL. As such, it can be thought of as yet another logging facade. However, SLF4J is much simpler in design and arguably more robust. In a nutshell, SLF4J avoid the class loader issues that plague JCL.

Do a google for "JCL classloader issues" for more on this...

like image 106
toolkit Avatar answered Sep 30 '22 09:09

toolkit