We are migration from Logback 1.2.11 to 1.4.7 and stumbled upon on an issues regarding the <include file=""> element.
When the <include file=""> element is used in combination with a <variable> as its value, it is not able to include the file when the variable is not on the scope "system".
Logback will keep trying to add the file to the ConfigurationWatchListUtil with the "_IS_UNDEFINED" replacement.
We are using logback via spring to load a file, this is done based on the configured file location using a <springProperty>. When investigating further we have noticed that this issue is not unique to the <springProperty> but also includes the <variable> and <property> elements.
When using the provided configuration the "include" variable is not substituted in the file element. It tries to substitute it, but it is not able to resolve its value.
However when using the following configuration:
Now the file will be included. Using any other scope then "system" will result into an "_IS_UNDEFINED" file inclusion.
For now we have found a workaround which we are not very keen on to keep using. By offloading the original variable onto a system scoped variable we are able to include the file. This does mean that we are exposing unwanted variable on the system properties which we would rather not.
Offloading a <springProperty> to a <variable> with the system scope also seems to work.