Allow spring properties to be used in logback <if> blocks
Reorder `SpringBootJoranConfigurator.addModelHandlerAssociations` so that handlers are added before calling the super method. Prior to this commit, handlers were added behind filters which prevented them from being used in `<if>` blocks. Fixes gh-33028pull/33064/head
parent
95557ddbc6
commit
0bdf7e8af7
@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<include resource="org/springframework/boot/logging/logback/base.xml" />
|
||||
<springProperty scope="context" name="MINE" source="my.example-property" />
|
||||
<if condition='property("MINE").contains("true")'>
|
||||
<then>
|
||||
<variable scope="context" name="MYCHECK" value="i-was-included" />
|
||||
</then>
|
||||
</if>
|
||||
</configuration>
|
Loading…
Reference in New Issue