ppkarwasz commented on issue #3104: URL: https://github.com/apache/logging-log4j2/issues/3104#issuecomment-2419429528
The YAML configuration format interprets **arrays** as a list of element having the same plugin type as the **key** of the array. Translated to XML your example looks like: ```xml <AppenderRef ref="CONSOLE"> <Filters> <MarkerFilter marker="COMMAND" onMatch="DENY" onMismatch="NEUTRAL"/> <Filters> <!-- This element is ignored since there can be only one filter element. An `ERROR` is logged to the status logger --> <Filters> <MarkerFilter marker="METRICS" onMatch="DENY" onMismatch="NEUTRAL"/> <Filters> </AppenderRef> ``` What you want is for your `Filters` YAML object to contain an array with key `MarkerFilter`: ```yaml AppenderRef: ref: CONSOLE Filters: MarkerFilter: - marker: COMMAND onMatch: DENY onMismatch: NEUTRAL - marker: METRICS onMatch: DENY onMismatch: NEUTRAL ``` See [Configuration syntax](https://logging.apache.org/log4j/2.x/manual/configuration.html#configuration-syntax). There is a tip about YAML arrays. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org