Slf4j and the difference logback

slf4j and logback difference:

  1. slf4j Java is a log of the facade, to achieve some common api logging framework;
  2. logback specific logging framework. Log4j and it is the same author, he is a new logging framework log4j in order to solve existing problems and development.
  3. slf4j and logback can be seen as a simple relationship of jdbc JDBC database and its specific jar package.
  4. Recommended slf4j, rather than directly using logback:

Wording differences:

slf4j usage:

log.info("Begin Start {}...{}", str1, str2);  

logback usage:

log.info("Begin Start " + str1 +"..." + str2);  

Above, sl4j both written and performance than logback stronger.

Source: http://www.360doc.com/content/19/1125/21/67564139_875444783.shtml

Guess you like

Origin www.cnblogs.com/cag2050/p/11930518.html