I believe the reason to be that the order of the children in the XML <appender>
element must follow the order declared in the DTD that the warning message shows. Quoting W3Schools about DTD elements:
When children are declared in a sequence separated by commas, the children must appear in the same sequence in the document.
Put your <layout>
element after the <triggeringPolicy>
element and the warning will likely disappear.