[logback-user] Why is Logback being configured twice?

Daniel Serodio (lists) daniel.listas at xxx.com.br
Thu Aug 4 23:01:28 CEST 2011

Hello Ceki,

This problem wasn't happening anymore, so I compared the logback.xml I'm 
using now and the one I was using when I posted to the list, and found 
the source of the problem: an encoding parameter for ConsoleAppender 
left from log4j configuration. If I remove this line (marked CAUSE 
below) the problem goes away.

Do you think I should I file a bug report?

<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="true">
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender" >
<param value="UTF-8" name="encoding"/> <!-- CAUSE -->
<pattern>%d{dd/MM/yyyy HH:mm:ss,SSS} %-5p [%c] %m%n</pattern>
<root level="INFO">
<appender-ref ref="CONSOLE"/>

Daniel Serodio

Ceki Gülcü wrote:
> Hello Daniel,
> Could you please post the contents of your logback.xml file ad well as 
> the output generated by logback on the console?
> Thanks,
> On 01/08/2011 10:38 PM, Daniel Serodio (lists) wrote:
>> I'm trying to switch an application from from log4j to Logback. This app
>> uses SLF4J, Spring Framework and is deployed in Tomcat 7.
>> Spring Framework uses JCL, so I added the following JARs to the
>> application's classpath:
>> slf4j-1.6.1.jar
>> jcl-over-slf4j-1.6.1.jar
>> logback-classic-0.9.29.jar
>> logback-core-0.9.29.jar
>> I created a logback.xml file, with debug="true" so I could debug my
>> configuration.
>> When I deploy this webapp in Tomcat, I can see that Logback is being
>> configured twice. Why would this happen?
>> Thanks in advance,
>> Daniel Serodio

More information about the Logback-user mailing list