Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.0-beta9
-
None
Description
Support was added to XMLConfiguration to allow XIncludes in the XML files. While this can be useful it does not allow for the use case where someone wants a default configuration and then a custom configuration to be merged with it.
I am proposing creating a CompositeConfiguration class that accepts a comma separated list of configuration files. It would then use the Configuration factories to create the appropriate Configuration classes for each of the underlying files. It would then merge the Node hierarchies created by each into a single tree and then finally construct the actual configuration Objects from that tree.
There are a few issues with this - for example each configuration can specify debug and verbose attributes, duplicate property settings, handling duplicate Appender names, etc. Most of these should be fairly easy to resolve.
Attachments
Issue Links
- is related to
-
LOG4J2-586 Capability to merge LoggerContexts or dynamically add an additional ConfigurationSource to a context.
-
- Open
-
-
LOG4J2-340 Is there a replacement for DomConfigurator in log4j2?
-
- Closed
-
- relates to
-
LOG4J2-804 XInclude does not respect classpath
-
- Closed
-
-
LOG4J2-1301 Automatic reconfiguration with xml and xinclude
-
- Closed
-