[logback-user] conditionals in logback.xml?

Thorbjørn Ravn Andersen thunderaxiom at gmail.com
Thu Jun 4 14:44:22 CEST 2009

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

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 

  Thorbjørn Ravn Andersen  "...plus... Tubular Bells!"

More information about the Logback-user mailing list