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

Duo Zhang commented on LOG4J2-3341:
-----------------------------------

Skimmed the code, I guess first we could introduce a CompoundProperty class, 
something like

{code}
@Plugin(name = "CompoundProperty", category = Node.CATEGORY, printObject = true)
public class CompoundProperty {
    @PluginFactory
    public static Property createProperty(
            @PluginAttribute("source") final String source,
            @PluginAttribute("targets") final String targets) {
        ...
    }

    public List<Property> getProperties() {
        ...
    }
}
{code}

And then change the PropertiesPlugin class to also accept CompoundProperty as a 
child element.

Maybe we need more plugin classes if the CompoundProperty also has child 
elements, but I think they are just some boilerplate code, the key problem here 
is to determine the way on how to split the original property.

The second thing is about how to add multiple appender refs at once, I think we 
could introduce a AppenderRefs plugin to do this.

Anyway, I could help here but I need a mentor...

Thanks.

> Support passing something like '-Dlog4j.rootLogger=INFO,Console' from command 
> line to set level and appenders at once
> ---------------------------------------------------------------------------------------------------------------------
>
>                 Key: LOG4J2-3341
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-3341
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Configuration
>            Reporter: Duo Zhang
>            Priority: Major
>
> Please see the discussion thread on the dev list.
> https://lists.apache.org/thread/gvfb3jkg6t11cyds4jmpo7lrswmx28w3
> The current direction is to introduce a new plugin to split the command line 
> argument.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to