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

Ralph Goers edited comment on LOG4J2-494 at 4/21/16 3:49 PM:
-------------------------------------------------------------

I'm looking at this patch some more and see a few issues.
1. Missing license header on CompositeConfiguratoin. This is not a big deal as 
I can easily fix it.
2. Code style doesn't match Log4j conventions. Again, I can fix these issues.
3. Reconfiguration is still supported for the subordinate configurations, but 
that doesn't trigger a new CompositeConfiguration to be created. This is a 
problem that needs to be addressed.
4. ConfigurationFactory has not been modified to support 
log4j.configurationFile containing a list of file names. To be useful, it needs 
to.
5. For filters it simply replaces the filter. Instead, it should insert a 
CompositeFilter and put the filters under that.
6. If I am following mergeNodes() correctly, If the "primary" configuration 
doesn't contain a filter, logger, properties, appender, etc, then those 
components won't be merged into the composite configuration.

Also, I prefer using a comma as the separator between file names instead of a 
semi-colon.


was (Author: [email protected]):
I'm looking at this patch some more and see a few issues.
1. Missing license header on CompositeConfiguratoin. This is not a big deal as 
I can easily fix it.
2. Code style doesn't match Log4j conventions. Again, I can fix these issues.
3. Reconfiguration is still supported for the subordinate configurations, but 
that doesn't trigger a new CompositeConfiguration to be created. This is a 
problem that needs to be addressed.
4. ConfigurationFactory has not been modified to support 
log4j.configurationFile containing a list of file names. To be useful, it needs 
to.
5. For filters it simply replaces the filter. Instead, it should insert a 
CompositeFilter and put the filters under that.

Also, I prefer using a comma as the separator between file names instead of a 
semi-colon.

> 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