In Log4j2, how do I associate an XML Schema with log4j2.xml?

Works for me with eclipse:

<Configuration strict="true"
           xmlns="http://logging.apache.org/log4j/2.0/config"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://logging.apache.org/log4j/2.0/config 
           https://raw.githubusercontent.com/apache/logging-log4j2/master/log4j-core/src/main/resources/Log4j-config.xsd">

or against tagged version:

<Configuration strict="true"
           xmlns="http://logging.apache.org/log4j/2.0/config"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://logging.apache.org/log4j/2.0/config 
           https://raw.githubusercontent.com/apache/logging-log4j2/log4j-2.8.2/log4j-core/src/main/resources/Log4j-config.xsd">

Leave a Comment