How do I set up commons-logging to use logback?

Artem picture Artem · Apr 12, 2012 · Viewed 24.1k times · Source

We use slf4j + logback, and happened to have some third-party libraries which use commons-logging. How do I set it up to use logback?

Answer

Spencer Kormos picture Spencer Kormos · Apr 12, 2012

The answer is to not use commons-logging.jar, since SLF4J was designed to do what commons-logging does but better. As @MahdeTo refers to, you need to use jcl-over-slf4j.jar.

Check out the documentation from the slf4j website on migrating from commons-logging.