I'm trying to use spring property values in logback.xml.
The file application-dev.properties (which is part of my jar) contains the property:
myapp.test.appender-class=ch.qos.logback.core.ConsoleAppender
and I added the following in the logback.xml:
<configuration scan="true" debug="true">
<property resource="application-dev.properties" />
<appender name="consoleAppender" class="${myapp.test.appender-class}">
When my application starts, I'm getting the following error:
ERROR in ch.qos.logback.core.joran.action.AppenderAction - Could not create an Appender of type [${appender-class}]. ch.qos.logback.core.util.DynamicClassLoadingException: Failed to instantiate type ${myapp.test.appender-class}
What am I doing wrong?
Note: I also tried to rename my logback.xml to logback-spring.xml, but this creates other problems.