All XML Schemas for Apache Logging Services projects are published at this directory. The canonical name for this directory is https://logging.apache.org/xml/ns.

Important

There are two important things to understand about XSD versioning scheme used here to employ these schemas in your applications:

  1. Schema versions and project versions evolve independently. That is, Log4j 2.24.0 release does not necessarily mean a new log4j-config-2.24.0.xsd: the Log4j 2 runtime configuration API might have been kept intact.

  2. Users are recommended to use schemas with only major versions; log4j-config-2.xsd, log4j-config-3.xsd, log4j-changelog-0.xsd, etc.

Log4j schemas

Log4j is a Java logging framework. Following schemas model the Log4j runtime configuration, i.e., log4j2.xml[1].

Publication date File name Description

2024-03-19

log4j-config-2.23.1.xsd

Released with Log4j 2.23.1

N/A

log4j-config-2.xsd

Points to the most recent XSD of major version 2. Log4j 2 users are recommended to refer to this XSD in their XML files.

2024-03-19

log4j-config-3.0.0.xsd

N/A

N/A

log4j-config-3.xsd

Points to the most recent XSD of major version 3. Log4j 3 users are recommended to refer to this XSD in their XML files.

Example Log4j 2 schema usage
<?xml version="1.0" encoding="UTF-8"?>
<Configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
               xmlns="https://logging.apache.org/xml/ns"
               xsi:schemaLocation="
                       https://logging.apache.org/xml/ns
                       https://logging.apache.org/xml/ns/log4j-config-2.xsd">
  <appenders>
    <Console name="Console" target="SYSTEM_OUT">
      <PatternLayout pattern="%d [%t] %p %c - %m%n"/>
    </Console>
  </appenders>
  <loggers>
    <root level="WARN">
      <AppenderRef ref="Console"/>
    </root>
  </loggers>
</Configuration>

Log4j Changelog schemas

Log4j Changelog is a tool to maintain changelogs. It is designed for Apache Log4j, but can be used for any Java project.

Publication date File name Description

2023-02-03

log4j-changelog-0.1.0.xsd

Released with Log4j Tools 0.2.0

2023-03-17

log4j-changelog-0.1.1.xsd

Released with Log4j Tools 0.3.0

2023-09-28

log4j-changelog-0.1.2.xsd

Released with Log4j Tools 0.5.0

2023-12-13

log4j-changelog-0.1.3.xsd

Released with Log4j Tools 0.7.0

2024-03-15

log4j-changelog-0.2.0.xsd

Planned to be released with Log4j Tools 0.8.0

N/A

log4j-changelog-0.xsd

Points to the most recent XSD of major version 0. Users are recommended to refer to this XSD in their XML files.

Example Log4j Changelog schema usage
<?xml version="1.0" encoding="UTF-8"?>
<entry xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns="https://logging.apache.org/xml/ns"
       xsi:schemaLocation="
               https://logging.apache.org/xml/ns
               https://logging.apache.org/xml/ns/log4j-changelog-0.xsd"
       type="updated">
  <issue id="2370" link="https://github.com/apache/logging-log4j2/pull/2370"/>
  <description format="asciidoc">Update `actions/checkout` to version `4.1.2`</description>
</entry>

1. Both Log4j 2 and Log4j 3 use log4j2.xml for configuration.