Difference between slf4j-log4j12 and log4j-over-slf4j

Use this if your code or some libraries you are using uses Log4j directly, but you want to use a different SLF4J binding than Log4j. It will route the Log4j API calls to SLF4J to the binding you choose. You need to remove the Log4j library from your classpath and replace it with this dependency.

Use this if you want to use the Log4j 1.2 binding for SLF4J.

You shouldn’t use both of these libraries at the same time.

Please note also that Log4j 2 has been released.

Leave a Comment