I am having trouble with multiples condition in IF statement into logback-spring.xml configuration file.
I have a condition for example condition='isDefined("SOME_PROP_1")'
and another one condition='isDefined("SOME_PROP_2")'
.
So as you can all asume by now I want to use those two condition in ONE if statement like this:
<if condition='isDefined("SOME_PROP_1") && isDefined("SOME_PROP_2")'>
...
</if>
OR
<if condition='isDefined("SOME_PROP_1") || isDefined("SOME_PROP_2")'>
...
</if>
Now the logical or works but the logical and does not because the & symbol is preserved. Does someone is aware how the logical and operator looks like in logback configuration ?
Well you need to change your && to &&
Because:
In HTML, the ampersand character (“&”) declares the beginning of an entity reference (a special character). If you want one to appear in text on a web page you should use the encoded named entity
&
Hope it helped you
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With