You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Published log4j-config-2.xsd rejects additivity on <Logger> #4475
Expected: <Logger name="..." additivity="false"> validates against https://logging.apache.org/xml/ns/log4j-config-2.xsd, as documented in the manual.
Actual: validation fails with "The attribute 'additivity' is not allowed"; <Root additivity="..."> validates.
Affects: the published schema only. Log4j 2.25.5 and 2.26.1 load the configuration and apply additivity="false".
Reproducer: xmllint --noout --schema log4j-config-2.xsd log4j2.xml with the configuration below.
Original report:
When validating the log4j2.xml against the XML schema at: https://logging.apache.org/xml/ns/log4j-config-2.xsd
the additivity attribute is located only on the Root, not on the Logger.
Hence XML schema validation fails on for example:
Thanks for the report. Log4j applies additivity on <Logger> correctly. Only the published schema leaves it out, the same gap as #3313 and apache/logging-log4j-tools#135.
The schema generator skipped boxed attributes such as Boolean additivity. That is fixed in apache/logging-log4j-tools#190 but not released yet, so log4j-config-2.xsd still needs a regenerate and republish.
The same republish adds other missing attributes, such as useRawMsg on RegexFilter and most of SocketOptions. Keeping this open until the new schema is published. @ppkarwasz, is a log4j-docgen release planned, so log4j-config-2.xsd can be regenerated? #2997 part b can close with this one then.
Activity
ramanathan1504 commentedon Nov 14, 2026
Thanks for the report. Log4j applies
additivityon<Logger>correctly. Only the published schema leaves it out, the same gap as #3313 and apache/logging-log4j-tools#135.The schema generator skipped boxed attributes such as
Boolean additivity. That is fixed in apache/logging-log4j-tools#190 but not released yet, solog4j-config-2.xsdstill needs a regenerate and republish.The same republish adds other missing attributes, such as
useRawMsgonRegexFilterand most ofSocketOptions. Keeping this open until the new schema is published.@ppkarwasz, is a
log4j-docgenrelease planned, solog4j-config-2.xsdcan be regenerated? #2997 part b can close with this one then.[-]additivity attribute[/-][+]Published `log4j-config-2.xsd` rejects `additivity` on `<Logger>`[/+]