Apache Commons Logging VS SLF4J in Java

‮//:sptth‬www.lautturi.com
Apache Commons Logging VS SLF4J in Java
Commons LoggingSLF4J
org.apache.commons.logging.Logorg.slf4j.Logger
org.apache.commons.logging.LogFactoryorg.slf4j.LoggerFactory

We have to spell strings while using Commons Logging:

int score = 99;
log.info("score " + score + " name " + p.getName() + "");

using SLF4J is a bit more terse:

int score = 99;
logger.info("score {} name {} ", score, p.getName());
Created Time:2017-09-05 22:05:29  Author:lautturi