<p>Hi,<br> <br>I have a question concerning getting LOGBack working with Spring using Maven.<br> <br>According to the Spring Documentation Spring needs to be forced to work iwth SLF4J. (sample code below)<br> <br>My question is how do I get LOGBack to work with this configuration (instead of log4j)?<br>
<br>The Spring documentation indicates that you need to use jcl-over-slf4j, but it is not clear how to configure LOGBack to work with Spring and SLF4J.<br> <br>My code, including the example code below builds for me intermiitently from the command line, indicating that there is some classloading issue.<br>
<br>Any advice will be much appreciated.<br> <br>Thanks.<br>Seamus Hannan<br> <br><dependencies><br> <dependency><br> <groupId>org.springframework</groupId><br> <artifactId>spring-context</artifactId><br>
<version>3.0.0.RELEASE</version><br> <scope>runtime</scope><br> <exclusions><br> <exclusion><br> <groupId>commons-logging</groupId><br> <artifactId>commons-logging</artifactId><br>
</exclusion><br> </exclusions><br> </dependency><br></dependencies> </p>
<p><dependencies><br> <dependency><br> <groupId>org.springframework</groupId><br> <artifactId>spring-context</artifactId><br> <version>3.0.0.RELEASE</version><br>
<scope>runtime</scope><br> <exclusions><br> <exclusion><br> <groupId>commons-logging</groupId><br> <artifactId>commons-logging</artifactId><br>
</exclusion><br> </exclusions><br> </dependency><br> <br> <!-- LOGBack dependendecy required for ViewLastLog.java --><br> <dependency><br> <groupId>ch.qos.logback</groupId><br>
<artifactId>logback-classic</artifactId><br> <version>0.9.26</version><br> </dependency></p>
<p> <dependency><br> <groupId>org.slf4j</groupId><br> <artifactId>jcl-over-slf4j</artifactId><br> <version>1.5.8</version><br> <scope>runtime</scope><br>
</dependency><br> <dependency><br> <groupId>org.slf4j</groupId><br> <artifactId>slf4j-api</artifactId><br> <version>1.5.8</version><br> <scope>runtime</scope><br>
</dependency><br> <dependency><br> <groupId>org.slf4j</groupId><br> <artifactId>slf4j-log4j12</artifactId><br> <version>1.5.8</version><br> <scope>runtime</scope><br>
</dependency><br> <dependency><br> <groupId>log4j</groupId><br> <artifactId>log4j</artifactId><br> <version>1.2.14</version><br> <scope>runtime</scope><br>
</dependency><br></dependencies> </p>