[ 
https://issues.apache.org/jira/browse/LOG4J2-494?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15116307#comment-15116307
 ] 

Gary Gregory commented on LOG4J2-494:
-------------------------------------

XInclude is out of the picture here since we also have to support JSON and YAML.

Importing would suck up the whole file, presumably also in the same format, 
rooted with a {{Configuration}} element in XML for example.

I could imagine using JXPath/XPath/something to provide both a file and (x)path 
into a file, but that should be for later. Let's get the first part baked ;-) 

For example:

{code:xml}
<Import uri="file:..." xpath="..." />
<Import uri="file:..." jxpath="..." />
{code}

But I do not know what a path would like in YAML/JSON. But I am getting way 
ahead here, we probably only need to get to a element and not worry about 
attributes... until we do ;-)

> Support composite configurations
> --------------------------------
>
>                 Key: LOG4J2-494
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-494
>             Project: Log4j 2
>          Issue Type: New Feature
>          Components: Configurators
>    Affects Versions: 2.0-beta9
>            Reporter: Ralph Goers
>            Assignee: Ralph Goers
>
> 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to