[logback-user] Appender Ref Default Value

David Harrigan dharrigan at gmail.com
Wed May 19 14:12:27 CEST 2010


Hiya,

Which component should I create an issue under?

logback-core
logback-classic
...?

-=david=-


Ceki Gulcu wrote:
> 
> 
> Hi David,
> 
> The feature your are asking for is definitely possible. If you file a 
> jira issue, I'll happily add it.
> 
> By the way, the type of variable substitution is supported quite 
> naturally in .groovy configuration files I am currently working on.
> 
> On 19/05/2010 11:30 AM, David Harrigan wrote:
>>
>> 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=-
>>
> 
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://qos.ch/mailman/listinfo/logback-user
> 
> 

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



More information about the Logback-user mailing list