[slf4j-user] blog entry on JCL

Ceki Gülcü listid at qos.ch
Mon Feb 5 21:01:33 CET 2007


The slf4j bindings are not cumulative. You cannot use both the
slf4j-simple binding and the slf4j-log4j binding, chose one or the other.

If you wish to use log4j, your dependency list should read:

          <dependency>
              <groupId>org.slf4j</groupId>
              <artifactId>jcl104-over-slf4j</artifactId>
              <version>${slf4j.version}</version>
          </dependency>
          <dependency>
              <groupId>org.slf4j</groupId>
              <artifactId>slf4j-log4j12</artifactId>
              <version>${slf4j.version}</version>
          </dependency>

HTH

 > On Mon, 5 Feb 2007 12:36:46 -0700, Matt Raible wrote:
 >
 > OK, adding sjf4j-simple as a dependency allows the plugin to work.  I
 > added the following 3 dependencies:
 >
 >
 >         <dependency>
 >             <groupId>org.slf4j</groupId>
 >             <artifactId>jcl104-over-slf4j</artifactId>
 >             <version>${slf4j.version}</version>
 >         </dependency>
 >         <dependency>
 >             <groupId>org.slf4j</groupId>
 >             <artifactId>slf4j-simple</artifactId>
 >             <version>${slf4j.version}</version>
 >         </dependency>
 >         <dependency>
 >             <groupId>org.slf4j</groupId>
 >             <artifactId>slf4j-log4j12</artifactId>
 >             <version>${slf4j.version}</version>
 >         </dependency>
 >
 >
 > However, with commons-logging, my log4j.xml (in src/test/resources)
 > was picked up and used automatically.  This doesn't seem to be
 > happening with slf4j.
 >
 >
 > Thanks,

 > Matt


-- 
Ceki Gülcü
Logback: The reliable, generic, fast and flexible logging framework for Java.
http://logback.qos.ch




More information about the slf4j-user mailing list