SLF4J 不依赖任何特殊的class loader机制,实际上,SLF4J 和已有日志实现的绑定是在编译时静态执行的,具体绑定工作是通过一个jar包实现的,使用时只要把相应的jar包(只有一个)放到类路径上即可。
在SLF4J发行版本中包含了几个jar包,如slf4j-nop.jar, slf4j-simple.jar, slf4j-log4j12.jar, slf4j-log4j13.jar, slf4j-jdk14.jar and slf4j-jcl.jar,Each of these jar files is hardwired at compile-time to use just one implementation, that is NOP, Simple, log4j version 1.2, log4j version 1.3, JDK 1.4 logging, and repectively JCL等.
SLF4J支持多个日志系统,比如NOP, Simple, log4j version 1.2, log4j version 1.3, JDK 1.4 logging, JCL and logback。