TypeLookup encounters the <abstractType first and consequently discards the <plugin, hence logger doesn't show up in the LoggerConfig XSD group.
How shall we solve the problem?
If an FQCN is a plugin and is also subclassed by other plugins:
DescriptorGenerator should not generate an AbstractType, but only a PluginType.
TypeLookup should promote an AbstractType to a PluginType if the associated FQCN is later on found to be a plugin. (This can still be the case even after the DescriptorGenerator fix mentioned above. That is, the plugin and the subclassed plugin can be provided in different descriptor files.)
This change fixes #117, which misses
loggers > logger
entry.Why is the entry missing?
log4j-core-plugins.xml
contains two entries forLoggerConfig
:<abstractType className="org.apache.logging.log4j.core.config.LoggerConfig">
<plugin name="logger" className="org.apache.logging.log4j.core.config.LoggerConfig">
TypeLookup
encounters the<abstractType
first and consequently discards the<plugin
, hencelogger
doesn't show up in theLoggerConfig
XSDgroup
.How shall we solve the problem?
If an FQCN is a plugin and is also subclassed by other plugins:
DescriptorGenerator
should not generate anAbstractType
, but only aPluginType
.TypeLookup
should promote anAbstractType
to aPluginType
if the associated FQCN is later on found to be a plugin. (This can still be the case even after theDescriptorGenerator
fix mentioned above. That is, the plugin and the subclassed plugin can be provided in different descriptor files.)