RSS Feed Subscribe to RSS Feed

 

SLF4J & Logback is the new commons-logging & log4j

Interesting post on which logging framework to choose from the logging mess. TLDR; Use SLF4J and logback.

I still default to log4j, but it sounds like logback (as the new alternative to log4j), wrapped by SLF4J (as the new alternative to commons logging) is the way forward. Both are written by Ceki Gülcü (blog), the original log4j author.

 

Update Nov 2018: It seems that even this this blog post is 7 years old, it still seems to be valid 🙂

I think the easiest way to use the slf4j/logback combo is to add logback-classic to your maven pom, as described at https://logback.qos.ch/setup.html#mavenBuild

Then follow the approach in https://www.slf4j.org/manual.html#hello_world

Tags: , , ,

Leave a Reply