Posts

Showing posts from January, 2012

Application logging through SLF4J : Quick Reference

The detailed information on SLF4J is available on http://www.slf4j.org . The primary reason of writing the blog is that there is lot of information but usually people do not have the time to do into the details, hense a quick reference is required to get it going. So I would be trying to put forward all the important aspects. The Simple Logging Facade for Java or (SLF4J) serves as a simple facade or abstraction for various logging frameworks, e.g. java.util.logging, log4j and logback, allowing the end user to plug in the desired logging framework at deployment time. Reason The obvious next question was that this is what JCL (Jakarta Commons Logging: http://commons.apache.org/ ) is all about. Why was the need for another facade? SLF4J does answer to few of drawbacks but there is no specific answer to why JCL was not modified. The drawbacks which are taken care as part of SLF4J are: Parameterized log messages solve an important problem associated with logging performance. Mark