logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralph Goers (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (LOG4J2-494) Support composite configurations
Date Fri, 22 Apr 2016 04:29:12 GMT

    [ 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/22/16 4:28 AM:
-------------------------------------------------------------

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. Update - after further review since the
subordinate configurations are never started their file watchers shouldn't be either, so reconfiguration
just can't be enabled.
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.
7. I think the merge logic is too simplistic. In fact, I suspect users will want a way to
customize this so that part needs to be pluggable.

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


was (Author: ralph.goers@dslextreme.com):
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.
7. I think the merge logic is too simplistic. In fact, I suspect users will want a way to
customize this so that part needs to be pluggable.

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: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org


Mime
View raw message