[logback-user] Appender Ref Default Value

David Harrigan dharrigan at gmail.com
Wed May 19 11:30:25 CEST 2010


Hiya,

I love the fact that in logback I can do this for a level:

<logger name="foo" level="${foo.bar.log.level:-debug}"/>

I would love to be able to do the following as well:

<appender-ref ref="${foo.bar.log.appender:-console}"/>

So that I can switch between different appenders during build time. At the
moment, If I try that, I get this warning from logback (0.9.21)

11:17:32,676 |-ERROR in ch.qos.logback.core.joran.action.AppenderRefAction -
Could not find an appender named [${foo.bar.log.appender:-console}]. Did you
define it below in the config file?
11:17:32,676 |-ERROR in ch.qos.logback.core.joran.action.AppenderRefAction -
See http://logback.qos.ch/codes.html#appender_order for more details.

Is this achievable?

-=david=-

-- 
View this message in context: http://old.nabble.com/Appender-Ref-Default-Value-tp28605941p28605941.html
Sent from the Logback User mailing list archive at Nabble.com.



More information about the Logback-user mailing list