Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Configuration type doesn't have MarkerFilter element #152

Open
IMurzich opened this issue Oct 10, 2024 · 1 comment
Open

Configuration type doesn't have MarkerFilter element #152

IMurzich opened this issue Oct 10, 2024 · 1 comment

Comments

@IMurzich
Copy link

Description

log4j.xml from https://github.com/apache/logging-log4j2/blob/2.x/src/site/antora/modules/ROOT/examples/manual/markers/log4j2.xml doesn't validate:

Multiple annotations found at this line:
- Element name 'MarkerFilter' is invalid.
One of the following is expected:

  • CustomLevels
  • Loggers

Error indicated by:
{https://logging.apache.org/xml/ns}
with code:
- cvc-complex-type.2.4.a: Invalid content was found starting with element
'{"https://logging.apache.org/xml/ns":MarkerFilter}'. One of '{"https://
logging.apache.org/xml/ns":CustomLevels, "https://logging.apache.org/xml/
ns":Loggers}' is expected.

Configuration

Version: Used xsd - https://logging.apache.org/xml/ns/log4j-config-2.xsd

Reproduction

validate https://github.com/apache/logging-log4j2/blob/2.x/src/site/antora/modules/ROOT/examples/manual/markers/log4j2.xml

@ppkarwasz ppkarwasz transferred this issue from apache/logging-log4j2 Oct 10, 2024
@ppkarwasz
Copy link
Contributor

@IMurzich,

Thank You for the report. I moved it to logging-log4j-tools, since the problem is caused by our log4j-docgen generator. The meta-definition of the <Component> element does not contain filters:

<elements>
<element type="org.apache.logging.log4j.core.config.PropertiesPlugin">
<description>Wrapper element for a list of properties</description>
</element>
<element type="org.apache.logging.log4j.core.config.AppendersPlugin" required="true">
<description>Wrapper element for a list of appenders</description>
</element>
<element type="org.apache.logging.log4j.core.config.CustomLevels">
<description>Wrapper element for a list of custom levels</description>
</element>
<element type="org.apache.logging.log4j.core.config.LoggersPlugin">
<description>Wrapper element for a list of logger configurations</description>
</element>
</elements>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants