[ https://issues.apache.org/jira/browse/LOG4J2-1686?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15664341#comment-15664341 ]
Mikael Ståldal commented on LOG4J2-1686: ---------------------------------------- Is the documentation example for {{ScriptAppenderSelector}} really correct? {code} In the following example, the script returns the name "List2". The appender name is recorded under the name of the ScriptAppenderSelector, not the name of the selected appender, in this example, "SelectIt". <ScriptAppenderSelector name="SelectIt"> <Script language="JavaScript"><![CDATA[ importPackage(java.lang); System.getProperty("os.name").search("Windows") > -1 ? "MyCustomWindowsAppender" : "MySyslogAppender";]]> </Script> <AppenderSet> <MyCustomWindowsAppender name="MyAppender" ... /> <SyslogAppender name="MySyslog" ... /> </AppenderSet> </ScriptAppenderSelector> {code} Shouldn't {{MyCustomWindowsAppender}} match {{MyAppender}} and {{MySyslogAppender}} match {{MySyslog}}? And what about {{List2}}? [~garydgregory]? > Support conditional configuration > --------------------------------- > > Key: LOG4J2-1686 > URL: https://issues.apache.org/jira/browse/LOG4J2-1686 > Project: Log4j 2 > Issue Type: New Feature > Components: Configurators > Affects Versions: 2.7 > Reporter: Raman Gupta > Priority: Blocker > > It would be great to support conditional configuration like logback: > http://logback.qos.ch/manual/configuration.html#conditional > This allows for more advanced configuration than is currently possible with > property substitution. > Example use case: to implement > https://issues.apache.org/jira/browse/LOG4J2-1685 without log4j library > support. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: log4j-dev-unsubscr...@logging.apache.org For additional commands, e-mail: log4j-dev-h...@logging.apache.org