-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Log4J2: PatternLayout "charset" in documentation but forbidden by xml schema #3423
Comments
If I use https://logging.apache.org/xml/ns/log4j-config-2.23.1.xsd instead of https://logging.apache.org/xml/ns/log4j-config-2.xsd, |
After digging through some code I found, that the plugin descriptor Line 368 in f2efdd5
java package, which then prevents attributes with those types from being included in the generated XSD in SchemaGenerator::writePluginAttribute . After removing the exclusion, the generated XSD contains the charset attribute.
A reasonable thing would probably be to allow generation of XML types for all classes for which a |
Could you submit a PR with the solution? |
Unfortunately, I'm not quite sure what "the solution" is. The simplest approach would be to just remove the exclusion pattern. The resulting XSD will contain the missing Based on this first approach, you could also explicitly exclude only the The in my opinion best, but probably also most difficult approach, would be to allow types based on the available |
Description
I have a config file for Log4j 2.x in XML format:
The XML validation is telling me:
The documentation for Log4j 2.x is telling me that an attribut
charset
exists inPatternLayout
: https://logging.apache.org/log4j/2.x/manual/pattern-layout.html#plugin-attr-charsetReading the website published at https://logging.apache.org/xml/ns, I get the impression that https://logging.apache.org/xml/ns/log4j-config-2.xsd is the official "configuration file xml schema".
Configuration
Version: Log4j 2.x
The text was updated successfully, but these errors were encountered: