[logback-user] conditionals in logback.xml?

Aleksey Didik didik at magenta-technology.ru
Thu Jun 4 14:52:56 CEST 2009


Hello all,
Conditions sounds good.
Now I use two different files for standart and debug mode of application 
and specify usage in start script using -Dlogback.configurationFile.
But conditional constructions will allow to make it more simple.

Best regards,
Aleskey Didik.
*
*

Thorbjørn Ravn Andersen ?????:
> Ceki Gulcu skrev  den 04-06-2009 12:52:
>>
>>
>> Joran does not come with conditional support. However, it could be
>> added. Assuming the necessary support was there, how would the
>> conditional segments look like?
>
> Well, I would either think an
>
> <if test="...">
> xml snippet
> </if>
>
> construction, where the snippet was only evaluated if the test was 
> true, or
>
> <appender-ref ref="..." if="${enable.appender.FOO}">
>
> would be nice.
> In any case it would be nice if this mechanism could be used to avoid 
> constructing unreferenced appenders, as I understand that they are 
> created when seen in the configuration process.
>
> (Oh, and I found that changes in FileAppender options (changing true 
> to false, etc) are not picked up when reloading default configuration 
> over JMX).
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://qos.ch/pipermail/logback-user/attachments/20090604/4659ef2c/attachment.htm>


More information about the Logback-user mailing list