The issue is a lot more complicated then ignoring unreferenced appenders. To keep a long story short, the underlying problem is fixed in 1.3.2 and 1.4.2. However, you would need to change your configuration file as follows:
<configuration>
<appender name="EXTRA_APPENDER" class="ch.qos.logback.core.rolling.RollingFileAppender">
...
</appender>
...
<root level="INFO">
<appender-ref ref="CONSOLE" />
<appender-ref ref="FILE" />
</root>
<if condition='isDefined("EXTRA")'>
<then>
<root>
<appender-ref ref="EXTRA_APPENDER" />
</root>
</then>
</if>
</configuration>
|