Slf4j Vs JUL Vs Logback Vs Log4j

There are multiple libraries for logging:

  • Java Util Logging: standard java logging packages that included with the libraries. Suitable for basic simple logging
  • Log4j: java logging library that suitable for more advanced logging.
  • Logback: Build as a successor of log4j to address the problems that log4j has.

Since a project can be using a combination of the above, Slf4j can be used to provide a standard interface that can be used with the whole 3 libraries.