Commons Logging | SLF4J |
---|---|
org.apache.commons.logging.Log | org.slf4j.Logger |
org.apache.commons.logging.LogFactory | org.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());